Skip to content

Commit a1c67ff

Browse files
nikictru
authored andcommitted
[ConstraintElim] Add test for llvm#68751 (NFC)
(cherry picked from commit 2b74db6)
1 parent ef50a36 commit a1c67ff

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,4 +423,17 @@ entry:
423423
ret i1 %res
424424
}
425425

426+
; FIXME: This is a miscompile.
427+
define i1 @pr68751(i128 %arg) {
428+
; CHECK-LABEL: @pr68751(
429+
; CHECK-NEXT: [[SHL1:%.*]] = shl nuw nsw i128 [[ARG:%.*]], 32
430+
; CHECK-NEXT: [[SHL2:%.*]] = shl nuw nsw i128 [[SHL1]], 32
431+
; CHECK-NEXT: ret i1 true
432+
;
433+
%shl1 = shl nuw nsw i128 %arg, 32
434+
%shl2 = shl nuw nsw i128 %shl1, 32
435+
%cmp = icmp eq i128 %shl2, 0
436+
ret i1 %cmp
437+
}
438+
426439
declare void @llvm.assume(i1)

0 commit comments

Comments
 (0)