Skip to content

Commit 13d4d56

Browse files
committed
Clean up testcase
Signed-off-by: John Lu <[email protected]>
1 parent a8fc8d1 commit 13d4d56

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

llvm/test/CodeGen/X86/narrow-load-metadata.ll

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
; RUN: llc < %s
1+
; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s
22
;
33
; This test case is reduced from RangeConstraintManager.cpp in a ASan build.
44
; It crashes reduceLoadWidth in DAGCombiner.cpp. Preservation of range
55
; metdata must ensure that ConstantRange truncation is strictly smaller.
66

7-
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
8-
target triple = "x86_64-unknown-linux-gnu"
9-
10-
define ptr @_ZN12_GLOBAL__N_121SymbolicRangeInferrer19VisitBinaryOperatorILN5clang18BinaryOperatorKindE15EEENS2_4ento8RangeSetES5_S5_NS2_8QualTypeE() {
7+
define i8 @_ZN12_GLOBAL__N_121SymbolicRangeInferrer19VisitBinaryOperatorILN5clang18BinaryOperatorKindE15EEENS2_4ento8RangeSetES5_S5_NS2_8QualTypeE(ptr %valptr) {
118
entry:
12-
%0 = load i8, ptr null, align 4, !range !0, !noundef !1
13-
%retval.sroa.1.0.insert.ext.i = zext i8 %0 to i64
9+
%val = load i8, ptr %valptr, align 4, !range !0, !noundef !1
10+
%retval.sroa.1.0.insert.ext.i = zext i8 %val to i64
1411
%retval.sroa.1.0.insert.shift.i = shl i64 %retval.sroa.1.0.insert.ext.i, 32
1512
%coerce.val.ii = trunc i64 %retval.sroa.1.0.insert.shift.i to i40
16-
store i40 %coerce.val.ii, ptr null, align 4
17-
ret ptr null
13+
store i40 %coerce.val.ii, ptr %valptr, align 4
14+
ret i8 %val
1815
}
1916

2017
!0 = !{i8 0, i8 2}

0 commit comments

Comments
 (0)