diff options
author | Sanjay Patel <spatel@rotateright.com> | 2022-11-07 12:39:32 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2022-11-08 08:28:56 -0500 |
commit | 6703d2ecf9da24f0f4611bff0a467e2aa7d16c18 (patch) | |
tree | 9f1fed39db9eba5b90875d7d625fdd9f5f7ea412 | |
parent | a356782426f5bf54a00570e1f925345e5fda7b2e (diff) | |
download | llvm-6703d2ecf9da24f0f4611bff0a467e2aa7d16c18.zip llvm-6703d2ecf9da24f0f4611bff0a467e2aa7d16c18.tar.gz llvm-6703d2ecf9da24f0f4611bff0a467e2aa7d16c18.tar.bz2 |
[VectorCombine] add test with addrspacecast; NFC
D137341
-rw-r--r-- | llvm/test/Transforms/VectorCombine/X86/load-widening.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Transforms/VectorCombine/X86/load-widening.ll b/llvm/test/Transforms/VectorCombine/X86/load-widening.ll index 40f610d..3df694b 100644 --- a/llvm/test/Transforms/VectorCombine/X86/load-widening.ll +++ b/llvm/test/Transforms/VectorCombine/X86/load-widening.ll @@ -350,3 +350,16 @@ define <4 x i32> @load_v2i32_v4i32_non_canonical_mask_commute(ptr dereferenceabl %s = shufflevector <2 x i32> poison, <2 x i32> %l, <4 x i32> <i32 2, i32 3, i32 undef, i32 undef> ret <4 x i32> %s } + +define <4 x i32> @load_v2i32_v4i32_addrspacecast(ptr addrspace(5) align 16 dereferenceable(16) %p) { +; CHECK-LABEL: @load_v2i32_v4i32_addrspacecast( +; CHECK-NEXT: [[ASC:%.*]] = addrspacecast ptr addrspace(5) [[P:%.*]] to ptr addrspace(42) +; CHECK-NEXT: [[L:%.*]] = load <2 x i32>, ptr addrspace(42) [[ASC]], align 4 +; CHECK-NEXT: [[S:%.*]] = shufflevector <2 x i32> [[L]], <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> +; CHECK-NEXT: ret <4 x i32> [[S]] +; + %asc = addrspacecast ptr addrspace(5) %p to ptr addrspace(42) + %l = load <2 x i32>, ptr addrspace(42) %asc, align 4 + %s = shufflevector <2 x i32> %l, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef> + ret <4 x i32> %s +} |