[X86] When creating a select for scalar masked sqrt and div builtins make sure we...
authorCraig Topper <craig.topper@intel.com>
Fri, 6 Jul 2018 22:46:52 +0000 (22:46 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 6 Jul 2018 22:46:52 +0000 (22:46 +0000)
commitf89f62a68094355bd37c74456aeef6ecab3898fe
tree730f4547d454f63fd4115aacfa47d178e838bd08
parent33648c335e2e8dc1d6c2188c4d379cdc97233dd8
[X86] When creating a select for scalar masked sqrt and div builtins make sure we optimize the all ones mask case.

This case occurs in the intrinsic headers so we should avoid emitting the mask in those cases.

Factor the code into a helper function to make this easy.

llvm-svn: 336472
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/avx512f-builtins.c