aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2022-05-26 08:23:36 -0400
committerSanjay Patel <spatel@rotateright.com>2022-05-26 09:08:47 -0400
commit3952c905ef08580de1ddc5d776177497407a6093 (patch)
tree7bc64817a6106bc73aefa4e609bc8dce93ffe53b /clang/lib/CodeGen/CodeGenModule.h
parentea6171c108c47c1ee486388adfa106e13e280e33 (diff)
downloadllvm-3952c905ef08580de1ddc5d776177497407a6093.zip
llvm-3952c905ef08580de1ddc5d776177497407a6093.tar.gz
llvm-3952c905ef08580de1ddc5d776177497407a6093.tar.bz2
[InstCombine] fold icmp equality with udiv and large constant
With large compare constant: (X u/ Y) == C --> (X == C) && (Y == 1) (X u/ Y) != C --> (X != C) || (Y != 1) https://alive2.llvm.org/ce/z/EhKwh6 There are various potential missing icmp (div) transforms shown here: https://github.com/llvm/llvm-project/issues/55695 This is a generalization for part of the udiv + equality. I didn't check in detail, but some of those may only make sense as codegen transforms. This results in one extra instruction in IR, but it is better for analysis, and looks much better in codegen on all targets that I tried. Differential Revision: https://reviews.llvm.org/D126410
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
0 files changed, 0 insertions, 0 deletions