[PATCH] D145812: [ConstraintElimination] UB reproducer for D145677
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 10:09:55 PST 2023
vitalybuka created this revision.
vitalybuka added a reviewer: fhahn.
Herald added a subscriber: StephenFan.
Herald added a project: All.
vitalybuka requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
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_overflow_4() {
+; CHECK-LABEL: @shl_overflow_4(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[SHL_UB:%.*]] = shl nuw nsw i256 0, 55
+; CHECK-NEXT: [[SHL_CMP:%.*]] = icmp uge i256 [[SHL_UB]], 0
+; CHECK-NEXT: ret i1 true
+;
+entry:
+ %shl.ub = shl nuw nsw i256 0, 55
+ %shl.cmp = icmp uge i256 %shl.ub, 0
+ ret i1 %shl.cmp
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145812.504201.patch
Type: text/x-patch
Size: 666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230310/f24ba9b2/attachment.bin>
More information about the llvm-commits
mailing list