Skip to content

Commit

Permalink
[ConstraintElim] Add test for #68751 (NFC)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2b74db6)
  • Loading branch information
nikic authored and tru committed Oct 24, 2023
1 parent ef50a36 commit a1c67ff
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit a1c67ff

Please sign in to comment.