diff options
author | Craig Topper <craig.topper@gmail.com> | 2016-07-04 07:09:46 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2016-07-04 07:09:46 +0000 |
commit | ac1823f6e947ffee2f5171a59cc2afc175b66781 (patch) | |
tree | 647532ee3a4a1b4d29eb325c0d6c723c5fbda99a /clang/lib/CodeGen/CGBuiltin.cpp | |
parent | d83f818a3e5156f2a1bc7fb3207992acee42986f (diff) | |
download | bcm5719-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.cpp | 2 |
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); } |