summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-10-09 17:52:26 +0000
committerSanjay Patel <spatel@rotateright.com>2019-10-09 17:52:26 +0000
commit0845ac7331e1e7af7ae4c104228f43a3f187b9c6 (patch)
tree1d8e1519d0fe42073d0270e1190c28e3e4a41f90
parent3419e90dc1a26b60555ee202a1e0914e04150f97 (diff)
downloadbcm5719-llvm-0845ac7331e1e7af7ae4c104228f43a3f187b9c6.tar.gz
bcm5719-llvm-0845ac7331e1e7af7ae4c104228f43a3f187b9c6.zip
[InstCombine] add another test for gep inbounds; NFC
llvm-svn: 374190
-rw-r--r--llvm/test/Transforms/InstCombine/load-bitcast-vec.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/load-bitcast-vec.ll b/llvm/test/Transforms/InstCombine/load-bitcast-vec.ll
index cb1b224e060..4874f2f5f42 100644
--- a/llvm/test/Transforms/InstCombine/load-bitcast-vec.ll
+++ b/llvm/test/Transforms/InstCombine/load-bitcast-vec.ll
@@ -89,6 +89,17 @@ define float @matching_scalar_smallest_deref_or_null(<4 x float>* dereferenceabl
ret float %r
}
+define float @matching_scalar_smallest_deref_addrspace(<4 x float> addrspace(4)* dereferenceable(1) %p) {
+; CHECK-LABEL: @matching_scalar_smallest_deref_addrspace(
+; CHECK-NEXT: [[BC:%.*]] = getelementptr inbounds <4 x float>, <4 x float> addrspace(4)* [[P:%.*]], i64 0, i64 0
+; CHECK-NEXT: [[R:%.*]] = load float, float addrspace(4)* [[BC]], align 16
+; CHECK-NEXT: ret float [[R]]
+;
+ %bc = bitcast <4 x float> addrspace(4)* %p to float addrspace(4)*
+ %r = load float, float addrspace(4)* %bc, align 16
+ ret float %r
+}
+
; TODO: Is a null pointer inbounds in any address space?
define float @matching_scalar_smallest_deref_or_null_addrspace(<4 x float> addrspace(4)* dereferenceable_or_null(1) %p) {
OpenPOWER on IntegriCloud