[llvm] r374190 - [InstCombine] add another test for gep inbounds; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 9 10:52:26 PDT 2019
Author: spatel
Date: Wed Oct 9 10:52:26 2019
New Revision: 374190
URL: http://llvm.org/viewvc/llvm-project?rev=374190&view=rev
Log:
[InstCombine] add another test for gep inbounds; NFC
Modified:
llvm/trunk/test/Transforms/InstCombine/load-bitcast-vec.ll
Modified: llvm/trunk/test/Transforms/InstCombine/load-bitcast-vec.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/load-bitcast-vec.ll?rev=374190&r1=374189&r2=374190&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/load-bitcast-vec.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/load-bitcast-vec.ll Wed Oct 9 10:52:26 2019
@@ -89,6 +89,17 @@ define float @matching_scalar_smallest_d
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) {
More information about the llvm-commits
mailing list