Skip to content

Commit 2b74db6

Browse files
committed
[ConstraintElim] Add test for #68751 (NFC)
1 parent ebf1fea commit 2b74db6

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
@@ -418,4 +418,17 @@ entry:
418418
ret i1 %res
419419
}
420420

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

0 commit comments

Comments
 (0)