diff options
author | Sanjay Patel <spatel@rotateright.com> | 2023-02-08 16:47:55 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2023-02-08 17:25:58 -0500 |
commit | 86b4d8645fc1b86693fef564cef68f24599c930f (patch) | |
tree | 717582c7f984d643580a40646c361efbcb2a7157 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | b98813fbb69751d95c7211784f0ca7735a935a36 (diff) | |
download | llvm-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