[all-commits] [llvm/llvm-project] 3fb13b: [InstSimplify] allow undefs in icmp with vector co...
RotateRight via All-commits
all-commits at lists.llvm.org
Tue Jul 28 12:18:11 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 3fb13b8484dcbec085da047879bf89ccb1b65b12
https://github.com/llvm/llvm-project/commit/3fb13b8484dcbec085da047879bf89ccb1b65b12
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2020-07-28 (Tue, 28 Jul 2020)
Changed paths:
M llvm/lib/Analysis/InstructionSimplify.cpp
M llvm/test/Transforms/InstSimplify/icmp-constant.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list