Skip to content

Commit

Permalink
[Tests] Remove unnecessary bitcasts from opaque pointer tests (NFC)
Browse files Browse the repository at this point in the history
Previously left these behind due to the required instruction
renumbering, drop them now. This more accurately represents
opaque pointer input IR.

Also drop duplicate opaque pointer check lines in one SROA test.
  • Loading branch information
nikic committed Jun 22, 2022
1 parent 615efc3 commit 60a3215
Show file tree
Hide file tree
Showing 23 changed files with 162 additions and 730 deletions.
70 changes: 29 additions & 41 deletions llvm/test/Transforms/EarlyCSE/AArch64/intrinsics.ll
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ for.cond: ; preds = %for.body, %entry
br i1 %cmp, label %for.body, label %for.end

for.body: ; preds = %for.cond
%0 = bitcast ptr %a to ptr
%1 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%2 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%0 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%1 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%2 = bitcast <16 x i8> %0 to <4 x i32>
%3 = bitcast <16 x i8> %1 to <4 x i32>
%4 = bitcast <16 x i8> %2 to <4 x i32>
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %3, <4 x i32> %4, ptr %0)
%5 = bitcast ptr %a to ptr
%vld2 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %5)
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %2, <4 x i32> %3, ptr %a)
%vld2 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %a)
%vld2.fca.0.extract = extractvalue { <4 x i32>, <4 x i32> } %vld2, 0
%vld2.fca.1.extract = extractvalue { <4 x i32>, <4 x i32> } %vld2, 1
%call = call <4 x i32> @vaddq_s32(<4 x i32> %vld2.fca.0.extract, <4 x i32> %vld2.fca.0.extract)
Expand Down Expand Up @@ -54,15 +52,13 @@ for.cond: ; preds = %for.body, %entry
br i1 %cmp, label %for.body, label %for.end

for.body: ; preds = %for.cond
%0 = bitcast ptr %a to ptr
%1 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%2 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%0 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%1 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%2 = bitcast <16 x i8> %0 to <4 x i32>
%3 = bitcast <16 x i8> %1 to <4 x i32>
%4 = bitcast <16 x i8> %2 to <4 x i32>
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %3, <4 x i32> %3, ptr %0)
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %3, <4 x i32> %4, ptr %0)
%5 = bitcast ptr %a to ptr
%vld2 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %5)
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %2, <4 x i32> %2, ptr %a)
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %2, <4 x i32> %3, ptr %a)
%vld2 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %a)
%vld2.fca.0.extract = extractvalue { <4 x i32>, <4 x i32> } %vld2, 0
%vld2.fca.1.extract = extractvalue { <4 x i32>, <4 x i32> } %vld2, 1
%call = call <4 x i32> @vaddq_s32(<4 x i32> %vld2.fca.0.extract, <4 x i32> %vld2.fca.0.extract)
Expand Down Expand Up @@ -90,12 +86,10 @@ for.cond: ; preds = %for.body, %entry
br i1 %cmp, label %for.body, label %for.end

for.body: ; preds = %for.cond
%0 = bitcast ptr %a to ptr
%vld2 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %0)
%vld2 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %a)
%vld2.fca.0.extract = extractvalue { <4 x i32>, <4 x i32> } %vld2, 0
%vld2.fca.1.extract = extractvalue { <4 x i32>, <4 x i32> } %vld2, 1
%1 = bitcast ptr %a to ptr
%vld22 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %1)
%vld22 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %a)
%vld22.fca.0.extract = extractvalue { <4 x i32>, <4 x i32> } %vld22, 0
%vld22.fca.1.extract = extractvalue { <4 x i32>, <4 x i32> } %vld22, 1
%call = call <4 x i32> @vaddq_s32(<4 x i32> %vld2.fca.0.extract, <4 x i32> %vld22.fca.0.extract)
Expand Down Expand Up @@ -124,15 +118,13 @@ for.cond: ; preds = %for.body, %entry
br i1 %cmp, label %for.body, label %for.end

for.body: ; preds = %for.cond
%0 = bitcast ptr %a to ptr
%1 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%2 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%0 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%1 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%2 = bitcast <16 x i8> %0 to <4 x i32>
%3 = bitcast <16 x i8> %1 to <4 x i32>
%4 = bitcast <16 x i8> %2 to <4 x i32>
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %3, <4 x i32> %4, ptr %0)
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %2, <4 x i32> %3, ptr %a)
store i32 0, ptr %b, align 4
%5 = bitcast ptr %a to ptr
%vld2 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %5)
%vld2 = call { <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld2.v4i32.p0(ptr %a)
%vld2.fca.0.extract = extractvalue { <4 x i32>, <4 x i32> } %vld2, 0
%vld2.fca.1.extract = extractvalue { <4 x i32>, <4 x i32> } %vld2, 1
%call = call <4 x i32> @vaddq_s32(<4 x i32> %vld2.fca.0.extract, <4 x i32> %vld2.fca.0.extract)
Expand Down Expand Up @@ -160,14 +152,12 @@ for.cond: ; preds = %for.body, %entry
br i1 %cmp, label %for.body, label %for.end

for.body: ; preds = %for.cond
%0 = bitcast ptr %a to ptr
%1 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%2 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%0 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%1 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%2 = bitcast <16 x i8> %0 to <4 x i32>
%3 = bitcast <16 x i8> %1 to <4 x i32>
%4 = bitcast <16 x i8> %2 to <4 x i32>
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %3, <4 x i32> %4, ptr %0)
%5 = bitcast ptr %a to ptr
%vld3 = call { <4 x i32>, <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld3.v4i32.p0(ptr %5)
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %2, <4 x i32> %3, ptr %a)
%vld3 = call { <4 x i32>, <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld3.v4i32.p0(ptr %a)
%vld3.fca.0.extract = extractvalue { <4 x i32>, <4 x i32>, <4 x i32> } %vld3, 0
%vld3.fca.2.extract = extractvalue { <4 x i32>, <4 x i32>, <4 x i32> } %vld3, 2
%call = call <4 x i32> @vaddq_s32(<4 x i32> %vld3.fca.0.extract, <4 x i32> %vld3.fca.2.extract)
Expand Down Expand Up @@ -196,15 +186,13 @@ for.cond: ; preds = %for.body, %entry
br i1 %cmp, label %for.body, label %for.end

for.body: ; preds = %for.cond
%0 = bitcast ptr %a to ptr
%1 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%2 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%0 = bitcast <4 x i32> %s.coerce.fca.0.extract to <16 x i8>
%1 = bitcast <4 x i32> %s.coerce.fca.1.extract to <16 x i8>
%2 = bitcast <16 x i8> %0 to <4 x i32>
%3 = bitcast <16 x i8> %1 to <4 x i32>
%4 = bitcast <16 x i8> %2 to <4 x i32>
call void @llvm.aarch64.neon.st3.v4i32.p0(<4 x i32> %4, <4 x i32> %3, <4 x i32> %3, ptr %0)
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %3, <4 x i32> %3, ptr %0)
%5 = bitcast ptr %a to ptr
%vld3 = call { <4 x i32>, <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld3.v4i32.p0(ptr %5)
call void @llvm.aarch64.neon.st3.v4i32.p0(<4 x i32> %3, <4 x i32> %2, <4 x i32> %2, ptr %a)
call void @llvm.aarch64.neon.st2.v4i32.p0(<4 x i32> %2, <4 x i32> %2, ptr %a)
%vld3 = call { <4 x i32>, <4 x i32>, <4 x i32> } @llvm.aarch64.neon.ld3.v4i32.p0(ptr %a)
%vld3.fca.0.extract = extractvalue { <4 x i32>, <4 x i32>, <4 x i32> } %vld3, 0
%vld3.fca.1.extract = extractvalue { <4 x i32>, <4 x i32>, <4 x i32> } %vld3, 1
%call = call <4 x i32> @vaddq_s32(<4 x i32> %vld3.fca.0.extract, <4 x i32> %vld3.fca.0.extract)
Expand Down
10 changes: 3 additions & 7 deletions llvm/test/Transforms/EarlyCSE/X86/preserve_memoryssa.ll
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,17 @@ entry:
br i1 undef, label %if.then274, label %for.cond404

if.then274: ; preds = %if.end256
%0 = bitcast ptr %exl.i to ptr
%arrayidx.i = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 1
%arrayidx1.i = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 2
%arrayidx2.i = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 3
%arrayidx3.i = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 4
%1 = bitcast ptr %exl.i to ptr
%arrayidx.i1034 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 1
%arrayidx1.i1035 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 2
%arrayidx2.i1036 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 3
%arrayidx3.i1037 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 4
unreachable

for.cond404: ; preds = %if.end256
%2 = bitcast ptr %exl.i to ptr
%arrayidx.i960 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 1
%arrayidx1.i961 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 2
%arrayidx2.i962 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 3
Expand All @@ -117,14 +114,13 @@ for.cond404: ; preds = %if.end256
%arrayidx3.i963 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 4

; MemoryUse(LoE)
%3 = load ptr, ptr @gnodeArray, align 8
%arrayidx6.i968 = getelementptr inbounds ptr, ptr %3, i64 undef
%0 = load ptr, ptr @gnodeArray, align 8
%arrayidx6.i968 = getelementptr inbounds ptr, ptr %0, i64 undef
; MemoryUse(1) MayAlias
%4 = load ptr, ptr %arrayidx6.i968, align 8
%1 = load ptr, ptr %arrayidx6.i968, align 8
br i1 undef, label %for.cond26.preheader.i974, label %if.then20.for.body_crit_edge.i999

for.cond26.preheader.i974: ; preds = %if.then20.i996
%5 = bitcast ptr %exl.i to ptr
%arrayidx.i924 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 1
%arrayidx1.i925 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 2
%arrayidx2.i926 = getelementptr inbounds [5 x i32], ptr %exl.i, i64 0, i64 3
Expand Down
49 changes: 23 additions & 26 deletions llvm/test/Transforms/InstSimplify/ConstProp/timeout.ll
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,47 @@ for.cond: ; preds = %for.inc, %entry

for.body: ; preds = %for.cond
%1 = load ptr, ptr %s, align 4
%2 = bitcast ptr %1 to ptr
%add.ptr = getelementptr inbounds i8, ptr %2, i32 4
%3 = ptrtoint ptr %add.ptr to i32
%4 = load ptr, ptr %s, align 4
%5 = bitcast ptr %4 to ptr
%add.ptr1 = getelementptr inbounds i8, ptr %5, i32 4
%6 = ptrtoint ptr %add.ptr1 to i32
%rem = urem i32 %6, 2
%add.ptr = getelementptr inbounds i8, ptr %1, i32 4
%2 = ptrtoint ptr %add.ptr to i32
%3 = load ptr, ptr %s, align 4
%add.ptr1 = getelementptr inbounds i8, ptr %3, i32 4
%4 = ptrtoint ptr %add.ptr1 to i32
%rem = urem i32 %4, 2
%cmp2 = icmp eq i32 %rem, 0
br i1 %cmp2, label %cond.true, label %cond.false

cond.true: ; preds = %for.body
br label %cond.end

cond.false: ; preds = %for.body
%7 = load ptr, ptr %s, align 4
%8 = bitcast ptr %7 to ptr
%add.ptr3 = getelementptr inbounds i8, ptr %8, i32 4
%9 = ptrtoint ptr %add.ptr3 to i32
%rem4 = urem i32 %9, 2
%5 = load ptr, ptr %s, align 4
%add.ptr3 = getelementptr inbounds i8, ptr %5, i32 4
%6 = ptrtoint ptr %add.ptr3 to i32
%rem4 = urem i32 %6, 2
br label %cond.end

cond.end: ; preds = %cond.false, %cond.true
%cond = phi i32 [ 0, %cond.true ], [ %rem4, %cond.false ]
%add = add i32 %3, %cond
%10 = inttoptr i32 %add to ptr
%11 = load ptr, ptr %s, align 4
%next = getelementptr inbounds %struct.ST, ptr %11, i32 0, i32 0
store ptr %10, ptr %next, align 4
%12 = load ptr, ptr %s, align 4
%next5 = getelementptr inbounds %struct.ST, ptr %12, i32 0, i32 0
%13 = load ptr, ptr %next5, align 4
store ptr %13, ptr %s, align 4
%add = add i32 %2, %cond
%7 = inttoptr i32 %add to ptr
%8 = load ptr, ptr %s, align 4
%next = getelementptr inbounds %struct.ST, ptr %8, i32 0, i32 0
store ptr %7, ptr %next, align 4
%9 = load ptr, ptr %s, align 4
%next5 = getelementptr inbounds %struct.ST, ptr %9, i32 0, i32 0
%10 = load ptr, ptr %next5, align 4
store ptr %10, ptr %s, align 4
br label %for.inc

for.inc: ; preds = %cond.end
%14 = load i32, ptr %j, align 4
%inc = add nsw i32 %14, 1
%11 = load i32, ptr %j, align 4
%inc = add nsw i32 %11, 1
store i32 %inc, ptr %j, align 4
br label %for.cond

for.end: ; preds = %for.cond
%15 = load ptr, ptr %s, align 4
%next6 = getelementptr inbounds %struct.ST, ptr %15, i32 0, i32 0
%12 = load ptr, ptr %s, align 4
%next6 = getelementptr inbounds %struct.ST, ptr %12, i32 0, i32 0
store ptr null, ptr %next6, align 4
ret void
}
Expand Down
9 changes: 4 additions & 5 deletions llvm/test/Transforms/InstSimplify/require-dominator.ll
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ define void @foo(ptr) #1 align 2 {

; <label>:2:
%3 = tail call ptr @_Znwm(i64 56) #10
%4 = bitcast ptr %3 to ptr
%p = load ptr, ptr undef, align 8
%5 = icmp eq ptr %p, %4
br i1 %5, label %exit, label %6
%4 = icmp eq ptr %p, %3
br i1 %4, label %exit, label %5

; <label>:6:
%7 = icmp eq ptr %p, null
br i1 %7, label %exit, label %8
%6 = icmp eq ptr %p, null
br i1 %6, label %exit, label %7

; <label>:8:
br label %exit
Expand Down
6 changes: 2 additions & 4 deletions llvm/test/Transforms/InstSimplify/simplify-nested-bitcast.ll
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ entry:
define i32 @f0(ptr addrspace(1), ptr addrspace(4)) #1 {
entry:
%2 = getelementptr inbounds %struct.__block_literal_generic, ptr addrspace(4) %1, i64 0, i32 3
%3 = bitcast ptr addrspace(4) %1 to ptr addrspace(4)
%4 = bitcast ptr addrspace(4) %2 to ptr addrspace(4)
%5 = load ptr, ptr addrspace(4) %4, align 8
%call = tail call i32 %5(ptr addrspace(4) %3, ptr addrspace(1) %0) #2
%3 = load ptr, ptr addrspace(4) %2, align 8
%call = tail call i32 %3(ptr addrspace(4) %1, ptr addrspace(1) %0) #2
ret i32 %call
}

Expand Down
17 changes: 6 additions & 11 deletions llvm/test/Transforms/SROA/address-spaces.ll
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ define void @copy_struct([5 x i64] %in.coerce, ptr addrspace(1) align 4 %ptr) {
;
for.end:
%in = alloca %struct.struct_test_27.0.13, align 8
%0 = bitcast ptr %in to ptr
store [5 x i64] %in.coerce, ptr %0, align 8
store [5 x i64] %in.coerce, ptr %in, align 8
%scevgep9 = getelementptr %struct.struct_test_27.0.13, ptr %in, i32 0, i32 4, i32 0
call void @llvm.memcpy.p1.p0.i32(ptr addrspace(1) align 4 %ptr, ptr align 4 %scevgep9, i32 16, i1 false)
ret void
Expand All @@ -87,10 +86,8 @@ define void @pr27557() {
; CHECK-NEXT: ret void
;
%1 = alloca %union.anon, align 8
%2 = bitcast ptr %1 to ptr
store ptr @g, ptr %2, align 8
%3 = bitcast ptr %1 to ptr
store ptr addrspace(3) @l, ptr %3, align 8
store ptr @g, ptr %1, align 8
store ptr addrspace(3) @l, ptr %1, align 8
ret void
}

Expand All @@ -103,11 +100,9 @@ define ptr @pr27557.alt() {
; CHECK-NEXT: ret ptr inttoptr (i64 ptrtoint (ptr addrspace(2) @l2 to i64) to ptr)
;
%1 = alloca %union.anon, align 8
%2 = bitcast ptr %1 to ptr
store ptr addrspace(2) @l2, ptr %2, align 8
%3 = bitcast ptr %1 to ptr
%4 = load ptr, ptr %3, align 8
ret ptr %4
store ptr addrspace(2) @l2, ptr %1, align 8
%2 = load ptr, ptr %1, align 8
ret ptr %2
}

; Make sure pre-splitting doesn't try to introduce an illegal bitcast
Expand Down
3 changes: 1 addition & 2 deletions llvm/test/Transforms/SROA/alignment.ll
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ define dso_local i32 @pr45010(ptr %A) {
%B = alloca %struct, align 4
%1 = load i32, ptr %A, align 4
store atomic volatile i32 %1, ptr %B release, align 4
%2 = bitcast ptr %B to ptr
%x = load atomic volatile i32, ptr %2 acquire, align 4
%x = load atomic volatile i32, ptr %B acquire, align 4
ret i32 %x
}

Expand Down
17 changes: 6 additions & 11 deletions llvm/test/Transforms/SROA/alloca-address-space.ll
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ define void @copy_struct([5 x i64] %in.coerce, ptr addrspace(1) align 4 %ptr) {
;
for.end:
%in = alloca %struct.struct_test_27.0.13, align 8, addrspace(2)
%0 = bitcast ptr addrspace(2) %in to ptr addrspace(2)
store [5 x i64] %in.coerce, ptr addrspace(2) %0, align 8
store [5 x i64] %in.coerce, ptr addrspace(2) %in, align 8
%scevgep9 = getelementptr %struct.struct_test_27.0.13, ptr addrspace(2) %in, i32 0, i32 4, i32 0
call void @llvm.memcpy.p1.p2.i32(ptr addrspace(1) align 4 %ptr, ptr addrspace(2) align 4 %scevgep9, i32 16, i1 false)
ret void
Expand All @@ -86,10 +85,8 @@ define void @pr27557() {
; CHECK-NEXT: ret void
;
%1 = alloca %union.anon, align 8, addrspace(2)
%2 = bitcast ptr addrspace(2) %1 to ptr addrspace(2)
store ptr @g, ptr addrspace(2) %2, align 8
%3 = bitcast ptr addrspace(2) %1 to ptr addrspace(2)
store ptr addrspace(3) @l, ptr addrspace(2) %3, align 8
store ptr @g, ptr addrspace(2) %1, align 8
store ptr addrspace(3) @l, ptr addrspace(2) %1, align 8
ret void
}

Expand All @@ -102,11 +99,9 @@ define ptr @pr27557.alt() {
; CHECK-NEXT: ret ptr inttoptr (i64 ptrtoint (ptr addrspace(4) @l4 to i64) to ptr)
;
%1 = alloca %union.anon, align 8, addrspace(2)
%2 = bitcast ptr addrspace(2) %1 to ptr addrspace(2)
store ptr addrspace(4) @l4, ptr addrspace(2) %2, align 8
%3 = bitcast ptr addrspace(2) %1 to ptr addrspace(2)
%4 = load ptr, ptr addrspace(2) %3, align 8
ret ptr %4
store ptr addrspace(4) @l4, ptr addrspace(2) %1, align 8
%2 = load ptr, ptr addrspace(2) %1, align 8
ret ptr %2
}

; Test load from and store to non-zero address space.
Expand Down
4 changes: 1 addition & 3 deletions llvm/test/Transforms/SROA/assume.ll
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ define void @_ZN2bg2baIiEC2ES_(i64 %v) {
entry:
%y = alloca i64, align 8
store i64 %v, ptr %y, align 8
%0 = bitcast ptr %y to ptr
%1 = bitcast ptr %0 to ptr
call void @llvm.assume(i1 true) [ "nonnull"(ptr %1) ]
call void @llvm.assume(i1 true) [ "nonnull"(ptr %y) ]
ret void
}

Expand Down
Loading

0 comments on commit 60a3215

Please sign in to comment.