Skip to content

Commit 0845ac7

Browse files
committed
[InstCombine] add another test for gep inbounds; NFC
llvm-svn: 374190
1 parent 3419e90 commit 0845ac7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

llvm/test/Transforms/InstCombine/load-bitcast-vec.ll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ define float @matching_scalar_smallest_deref_or_null(<4 x float>* dereferenceabl
8989
ret float %r
9090
}
9191

92+
define float @matching_scalar_smallest_deref_addrspace(<4 x float> addrspace(4)* dereferenceable(1) %p) {
93+
; CHECK-LABEL: @matching_scalar_smallest_deref_addrspace(
94+
; CHECK-NEXT: [[BC:%.*]] = getelementptr inbounds <4 x float>, <4 x float> addrspace(4)* [[P:%.*]], i64 0, i64 0
95+
; CHECK-NEXT: [[R:%.*]] = load float, float addrspace(4)* [[BC]], align 16
96+
; CHECK-NEXT: ret float [[R]]
97+
;
98+
%bc = bitcast <4 x float> addrspace(4)* %p to float addrspace(4)*
99+
%r = load float, float addrspace(4)* %bc, align 16
100+
ret float %r
101+
}
102+
92103
; TODO: Is a null pointer inbounds in any address space?
93104

94105
define float @matching_scalar_smallest_deref_or_null_addrspace(<4 x float> addrspace(4)* dereferenceable_or_null(1) %p) {

0 commit comments

Comments
 (0)