aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2023-02-08 16:47:55 -0500
committerSanjay Patel <spatel@rotateright.com>2023-02-08 17:25:58 -0500
commit86b4d8645fc1b86693fef564cef68f24599c930f (patch)
tree717582c7f984d643580a40646c361efbcb2a7157 /clang/lib/Frontend/CompilerInvocation.cpp
parentb98813fbb69751d95c7211784f0ca7735a935a36 (diff)
downloadllvm-86b4d8645fc1b86693fef564cef68f24599c930f.zip
llvm-86b4d8645fc1b86693fef564cef68f24599c930f.tar.gz
llvm-86b4d8645fc1b86693fef564cef68f24599c930f.tar.bz2
[InstCombine] canonicalize cmp+select as umin/umax
(V == 0) ? 1 : V --> umax(V, 1) (V == UMAX) ? UMAX-1 : V --> umin(V, UMAX-1) https://alive2.llvm.org/ce/z/pfDBAf This is one pair of the variants discussed in issue #60374. Enhancements for the other end of the constant range and signed variants are potential follow-ups, but that may require more work because we canonicalize at least one min/max like that to icmp+zext.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions