[PATCH] D145812: [ConstraintElimination] UB reproducer for D145677

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 10:23:30 PST 2023


vitalybuka updated this revision to Diff 504209.
vitalybuka added a comment.

another 1


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145812/new/

https://reviews.llvm.org/D145812

Files:
  llvm/test/Transforms/ConstraintElimination/shl.ll


Index: llvm/test/Transforms/ConstraintElimination/shl.ll
===================================================================
--- llvm/test/Transforms/ConstraintElimination/shl.ll
+++ llvm/test/Transforms/ConstraintElimination/shl.ll
@@ -1275,3 +1275,16 @@
   %shl.cmp = icmp uge i256 %shl.ub, 0
   ret i1 %shl.cmp
 }
+
+define i1 @shl_55() {
+; CHECK-LABEL: @shl_55(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[SHL_UB:%.*]] = shl nuw nsw i256 1, 55
+; CHECK-NEXT:    [[SHL_CMP:%.*]] = icmp uge i256 [[SHL_UB]], 1
+; CHECK-NEXT:    ret i1 true
+;
+entry:
+  %shl.ub = shl nuw nsw i256 1, 55
+  %shl.cmp = icmp uge i256 %shl.ub, 1
+  ret i1 %shl.cmp
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145812.504209.patch
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230310/6f571dff/attachment.bin>


More information about the llvm-commits mailing list