aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-01-04 16:50:53 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-01-04 17:30:51 +0300
commit772ede3d5d552e0214473f247f7f98f15e596fe5 (patch)
treeec805d546dcd3c3221ae62298421dfdeef9a0f12 /llvm/lib/Transforms/Utils/LoopUtils.cpp
parentd2b79c76be5b1613d80364888286e7ead70674eb (diff)
downloadllvm-772ede3d5d552e0214473f247f7f98f15e596fe5.zip
llvm-772ede3d5d552e0214473f247f7f98f15e596fe5.tar.gz
llvm-772ede3d5d552e0214473f247f7f98f15e596fe5.tar.bz2
[InstCombine] Sink sub into hands of select if one hand becomes zero. Part 2 (PR44426)
This decreases use count of %Op0, makes one hand of select to be 0, and possibly exposes further folding potential. Name: sub %Op0, (select %Cond, %Op0, %FalseVal) -> select %Cond, 0, (sub %Op0, %FalseVal) %Op0 = %TrueVal %o = select i1 %Cond, i8 %Op0, i8 %FalseVal %r = sub i8 %Op0, %o => %n = sub i8 %Op0, %FalseVal %r = select i1 %Cond, i8 0, i8 %n Name: sub %Op0, (select %Cond, %TrueVal, %Op0) -> select %Cond, (sub %Op0, %TrueVal), 0 %Op0 = %FalseVal %o = select i1 %Cond, i8 %TrueVal, i8 %Op0 %r = sub i8 %Op0, %o => %n = sub i8 %Op0, %TrueVal %r = select i1 %Cond, i8 %n, i8 0 https://rise4fun.com/Alive/aHRt https://bugs.llvm.org/show_bug.cgi?id=44426
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
0 files changed, 0 insertions, 0 deletions