aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2020-08-23 14:58:29 -0400
committerSanjay Patel <spatel@rotateright.com>2020-08-24 07:37:55 -0400
commit6a44edb8da335bba355cd180a3f43564d14cd1be (patch)
tree43a97b7dc3f48b5d7aee4d8bca114ca809392388 /clang/lib/Frontend/CompilerInvocation.cpp
parent52df6cac204a866d1797dad844c1e587a1b4b075 (diff)
downloadllvm-6a44edb8da335bba355cd180a3f43564d14cd1be.zip
llvm-6a44edb8da335bba355cd180a3f43564d14cd1be.tar.gz
llvm-6a44edb8da335bba355cd180a3f43564d14cd1be.tar.bz2
[InstCombine] fold abs of select with negated op (PR39474)
Similar to the existing transform - peek through a select to match a value and its negation. https://alive2.llvm.org/ce/z/MXi5KG define i8 @src(i1 %b, i8 %x) { %0: %neg = sub i8 0, %x %sel = select i1 %b, i8 %x, i8 %neg %abs = abs i8 %sel, 1 ret i8 %abs } => define i8 @tgt(i1 %b, i8 %x) { %0: %abs = abs i8 %x, 1 ret i8 %abs } Transformation seems to be correct!
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions