summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/builtins-x86.c
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2014-05-29 20:47:29 +0000
committerAdam Nemet <anemet@apple.com>2014-05-29 20:47:29 +0000
commit286ae08e7daad677ffa53799d2ec3fc9a9b1862b (patch)
treec9bc2d322595280fc0312546c6e9a81bbe7e0301 /clang/test/CodeGen/builtins-x86.c
parent0428c978376cfdee8a774521f52bfc29efb6374e (diff)
downloadbcm5719-llvm-286ae08e7daad677ffa53799d2ec3fc9a9b1862b.tar.gz
bcm5719-llvm-286ae08e7daad677ffa53799d2ec3fc9a9b1862b.zip
Implement AVX1 vbroadcast intrinsics with vector initializers
These intrinsics are special because they directly take a memory operand (AVX2 adds the register counterparts). Typically, other non-memop intrinsics take registers and then it's left to isel to fold memory operands. In order to LICM intrinsics directly reading memory, we require that no stores are in the loop (LICM) or that the folded load accesses constant memory (MachineLICM). When neither is the case we fail to hoist a loop-invariant broadcast. We can work around this limitation if we expose the load as a regular load and then just implement the broadcast using the vector initializer syntax. This exposes the load to LICM and other optimizations. At the IR level this is translated into a series of insertelements. The sequence is already recognized as a broadcast so there is no impact on the quality of codegen. _mm256_broadcast_pd and _mm256_broadcast_ps are not updated by this patch because right now we lack the DAG-combiner smartness to recover the broadcast instructions. This will be tackled in a follow-on. There will be completing changes on the LLVM side to remove the LLVM intrinsics and to auto-upgrade bitcode files. Fixes <rdar://problem/16494520> llvm-svn: 209846
Diffstat (limited to 'clang/test/CodeGen/builtins-x86.c')
-rw-r--r--clang/test/CodeGen/builtins-x86.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/test/CodeGen/builtins-x86.c b/clang/test/CodeGen/builtins-x86.c
index 6df005d8604..8443574c528 100644
--- a/clang/test/CodeGen/builtins-x86.c
+++ b/clang/test/CodeGen/builtins-x86.c
@@ -451,9 +451,6 @@ void f0() {
tmp_i = __builtin_ia32_movmskps256(tmp_V8f);
__builtin_ia32_vzeroall();
__builtin_ia32_vzeroupper();
- tmp_V4f = __builtin_ia32_vbroadcastss(tmp_fCp);
- tmp_V4d = __builtin_ia32_vbroadcastsd256(tmp_dCp);
- tmp_V8f = __builtin_ia32_vbroadcastss256(tmp_fCp);
tmp_V4d = __builtin_ia32_vbroadcastf128_pd256(tmp_V2dCp);
tmp_V8f = __builtin_ia32_vbroadcastf128_ps256(tmp_V4fCp);
__builtin_ia32_storeupd256(tmp_dp, tmp_V4d);
OpenPOWER on IntegriCloud