[llvm] ade7ae4 - [InstSimplify] Add test for #77320 (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 06:53:08 PST 2024
Author: Nikita Popov
Date: 2024-01-08T15:52:58+01:00
New Revision: ade7ae4760a0b0e74cddd8f852830ca946295930
URL: https://github.com/llvm/llvm-project/commit/ade7ae4760a0b0e74cddd8f852830ca946295930
DIFF: https://github.com/llvm/llvm-project/commit/ade7ae4760a0b0e74cddd8f852830ca946295930.diff
LOG: [InstSimplify] Add test for #77320 (NFC)
Added:
Modified:
llvm/test/Transforms/InstSimplify/select.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstSimplify/select.ll b/llvm/test/Transforms/InstSimplify/select.ll
index 1b229f55109394..899179e1ccbc22 100644
--- a/llvm/test/Transforms/InstSimplify/select.ll
+++ b/llvm/test/Transforms/InstSimplify/select.ll
@@ -1733,3 +1733,17 @@ define i8 @select_or_disjoint_eq(i8 %x, i8 %y) {
%sel = select i1 %cmp, i8 %x, i8 %or
ret i8 %sel
}
+
+; FIXME: This is a miscompile.
+define <4 x i32> @select_vector_cmp_with_bitcasts(<2 x i64> %x, <4 x i32> %y) {
+; CHECK-LABEL: @select_vector_cmp_with_bitcasts(
+; CHECK-NEXT: ret <4 x i32> zeroinitializer
+;
+ %x.bc = bitcast <2 x i64> %x to <4 x i32>
+ %y.bc = bitcast <4 x i32> %y to <2 x i64>
+ %sub = sub <2 x i64> %x, %y.bc
+ %sub.bc = bitcast <2 x i64> %sub to <4 x i32>
+ %cmp = icmp eq <4 x i32> %y, %x.bc
+ %sel = select <4 x i1> %cmp, <4 x i32> %sub.bc, <4 x i32> zeroinitializer
+ ret <4 x i32> %sel
+}
More information about the llvm-commits
mailing list