Skip to content

Commit

Permalink
[ConstraintElimination] UB reproducer for D145677
Browse files Browse the repository at this point in the history
Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D145812
  • Loading branch information
vitalybuka committed Mar 10, 2023
1 parent 5c18444 commit 2cf632a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions llvm/test/Transforms/ConstraintElimination/shl.ll
Expand Up @@ -1275,3 +1275,16 @@ entry:
%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
}

0 comments on commit 2cf632a

Please sign in to comment.