aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2021-06-30 17:27:10 -0400
committerSanjay Patel <spatel@rotateright.com>2021-06-30 19:00:12 -0400
commit0c400e8953069888315f85d62780839dccbaa33c (patch)
tree34e4ebc33e6f1a3e1f37cb5725fefff8d961eb09 /llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
parentb2fe025707aae780d88db2446fc1ce618e40bdb3 (diff)
downloadllvm-0c400e8953069888315f85d62780839dccbaa33c.zip
llvm-0c400e8953069888315f85d62780839dccbaa33c.tar.gz
llvm-0c400e8953069888315f85d62780839dccbaa33c.tar.bz2
[InstCombine] fold icmp ult of offset value with constant
This is one sibling of the fold added with c7b658aeb526 . (X + C2) <u C --> X >s ~C2 (if C == C2 + SMIN) I'm still not sure how to describe it best, but we're translating 2 constants from an unsigned range comparison to signed because that eliminates the offset (add) op. This could be extended to handle the more general (non-constant) pattern too: https://alive2.llvm.org/ce/z/K-fMBf define i1 @src(i8 %a, i8 %c2) { %t = add i8 %a, %c2 %c = add i8 %c2, 128 ; SMIN %ov = icmp ult i8 %t, %c ret i1 %ov } define i1 @tgt(i8 %a, i8 %c2) { %not_c2 = xor i8 %c2, -1 %ov = icmp sgt i8 %a, %not_c2 ret i1 %ov }
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp')
0 files changed, 0 insertions, 0 deletions