[llvm] 66c6de6 - [InstCombine] Add test for PR57899 (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 07:00:29 PDT 2022
Author: Nikita Popov
Date: 2022-09-22T16:00:14+02:00
New Revision: 66c6de6c9cdf41fa37ba000aa6567a33ad5f570b
URL: https://github.com/llvm/llvm-project/commit/66c6de6c9cdf41fa37ba000aa6567a33ad5f570b
DIFF: https://github.com/llvm/llvm-project/commit/66c6de6c9cdf41fa37ba000aa6567a33ad5f570b.diff
LOG: [InstCombine] Add test for PR57899 (NFC)
Added:
Modified:
llvm/test/Transforms/InstCombine/zext.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstCombine/zext.ll b/llvm/test/Transforms/InstCombine/zext.ll
index 32b5fe07d908..82d91798438e 100644
--- a/llvm/test/Transforms/InstCombine/zext.ll
+++ b/llvm/test/Transforms/InstCombine/zext.ll
@@ -510,3 +510,29 @@ define i8 @disguised_signbit_clear_test(i64 %x) {
%t6 = zext i1 %t4 to i8
ret i8 %t6
}
+
+; FIXME: Currently miscompiled.
+define i16 @pr57899(i1 %c, i32 %x) {
+; CHECK-LABEL: @pr57899(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br i1 [[C:%.*]], label [[IF:%.*]], label [[JOIN:%.*]]
+; CHECK: if:
+; CHECK-NEXT: br label [[JOIN]]
+; CHECK: join:
+; CHECK-NEXT: ret i16 0
+;
+entry:
+ br i1 %c, label %if, label %join
+
+if:
+ %g.1 = select i1 false, i32 %x, i32 1
+ br label %join
+
+join:
+ %g.2 = phi i32 [ %g.1, %if ], [ 1, %entry ]
+ %tobool1 = icmp ne i32 %g.2, 4
+ %tobool3 = icmp ne i32 %g.2, 64
+ %x1 = and i1 %tobool1, %tobool3
+ %conv4 = zext i1 %x1 to i16
+ ret i16 %conv4
+}
More information about the llvm-commits
mailing list