summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2016-07-04 07:09:46 +0000
committerCraig Topper <craig.topper@gmail.com>2016-07-04 07:09:46 +0000
commitac1823f6e947ffee2f5171a59cc2afc175b66781 (patch)
tree647532ee3a4a1b4d29eb325c0d6c723c5fbda99a /clang/lib/CodeGen/CGBuiltin.cpp
parentd83f818a3e5156f2a1bc7fb3207992acee42986f (diff)
downloadbcm5719-llvm-ac1823f6e947ffee2f5171a59cc2afc175b66781.tar.gz
bcm5719-llvm-ac1823f6e947ffee2f5171a59cc2afc175b66781.zip
[AVX512] Modify what indices we emit for the zero vector we use for zero extension of the result of a v2i1 or v4i1 masked compare. This way we emit something that the backend easily interprets as a concatenation rather than a true shuffle. This delivers slightly better codegen with the current backend capabilities.
llvm-svn: 274484
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 8a5e2919f68..57628f0f44c 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -6512,7 +6512,7 @@ static Value *EmitX86MaskedCompare(CodeGenFunction &CGF, unsigned CC,
for (unsigned i = 0; i != NumElts; ++i)
Indices[i] = i;
for (unsigned i = NumElts; i != 8; ++i)
- Indices[i] = NumElts;
+ Indices[i] = i % NumElts + NumElts;
Cmp = CGF.Builder.CreateShuffleVector(
Cmp, llvm::Constant::getNullValue(Cmp->getType()), Indices);
}
OpenPOWER on IntegriCloud