diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-07-28 15:13:19 -0400 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-07-28 15:13:53 -0400 |
commit | 3fb13b8484dcbec085da047879bf89ccb1b65b12 (patch) | |
tree | b3917ab66186e880e5e4ccb84b3e6e77bcd9c6fc /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 67dfba96296b37f7bac9b4a68572288bc44b63b2 (diff) | |
download | llvm-3fb13b8484dcbec085da047879bf89ccb1b65b12.zip llvm-3fb13b8484dcbec085da047879bf89ccb1b65b12.tar.gz llvm-3fb13b8484dcbec085da047879bf89ccb1b65b12.tar.bz2 |
[InstSimplify] allow undefs in icmp with vector constant folds
This is the main icmp simplification shortcoming seen in D84655.
Alive2 agrees that the basic examples are correct at least:
define <2 x i1> @src(<2 x i8> %x) {
%0:
%r = icmp sle <2 x i8> { undef, 128 }, %x
ret <2 x i1> %r
}
=>
define <2 x i1> @tgt(<2 x i8> %x) {
%0:
ret <2 x i1> { 1, 1 }
}
Transformation seems to be correct!
define <2 x i1> @src(<2 x i32> %X) {
%0:
%A = or <2 x i32> %X, { 63, 63 }
%B = icmp ult <2 x i32> %A, { undef, 50 }
ret <2 x i1> %B
}
=>
define <2 x i1> @tgt(<2 x i32> %X) {
%0:
ret <2 x i1> { 0, 0 }
}
Transformation seems to be correct!
https://alive2.llvm.org/ce/z/omt2ee
https://alive2.llvm.org/ce/z/GW4nP_
Differential Revision: https://reviews.llvm.org/D84762
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
0 files changed, 0 insertions, 0 deletions