[llvm-branch-commits] [llvm] a1c67ff - [ConstraintElim] Add test for #68751 (NFC)

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 23 23:31:33 PDT 2023


Author: Nikita Popov
Date: 2023-10-24T08:29:57+02:00
New Revision: a1c67ffd0a1f85f283f1ec734827c6306031bafb

URL: https://github.com/llvm/llvm-project/commit/a1c67ffd0a1f85f283f1ec734827c6306031bafb
DIFF: https://github.com/llvm/llvm-project/commit/a1c67ffd0a1f85f283f1ec734827c6306031bafb.diff

LOG: [ConstraintElim] Add test for #68751 (NFC)

(cherry picked from commit 2b74db6c9bff757ce016d62a7086617e2b9e43b3)

Added: 
    

Modified: 
    llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll b/llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll
index f08068420406d14..91ab42ee701b41e 100644
--- a/llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll
+++ b/llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll
@@ -423,4 +423,17 @@ entry:
   ret i1 %res
 }
 
+; FIXME: This is a miscompile.
+define i1 @pr68751(i128 %arg) {
+; CHECK-LABEL: @pr68751(
+; CHECK-NEXT:    [[SHL1:%.*]] = shl nuw nsw i128 [[ARG:%.*]], 32
+; CHECK-NEXT:    [[SHL2:%.*]] = shl nuw nsw i128 [[SHL1]], 32
+; CHECK-NEXT:    ret i1 true
+;
+  %shl1 = shl nuw nsw i128 %arg, 32
+  %shl2 = shl nuw nsw i128 %shl1, 32
+  %cmp = icmp eq i128 %shl2, 0
+  ret i1 %cmp
+}
+
 declare void @llvm.assume(i1)


        


More information about the llvm-branch-commits mailing list