Skip to content
Commit 30ef70b0 authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[InstCombine] fold X urem C -> X < C ? X : X - C when C is big (PR28672)

We already have the udiv variant of this transform, so I think this is ok for 
InstCombine too even though there is an increase in IR instructions. As the 
tests and TODO comments show, the transform can lead to follow-on combines.

This should fix: https://llvm.org/bugs/show_bug.cgi?id=28672

Differential Revision: https://reviews.llvm.org/D24527

llvm-svn: 282209
parent 3acdf385
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment