aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-11-04 14:42:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-11-04 14:42:02 +0000
commitce9602e2894244cc7e2915acfd50d783b2d4f949 (patch)
tree27c94a584d4830e271fcce73ab31cd43d828a15a /lib/CodeGen/CGBuiltin.cpp
parentf10971f5ff4df3ff41ab6728a338522b945e4b40 (diff)
downloadsrc-vendor/clang/clang-release_70-r346007.tar.gz
src-vendor/clang/clang-release_70-r346007.zip
Vendor import of clang release_70 branch r346007:vendor/clang/clang-release_70-r346007
Diffstat (limited to 'lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--lib/CodeGen/CGBuiltin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index 669a3be0e6e1..0770c204dab1 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/lib/CodeGen/CGBuiltin.cpp
@@ -8952,9 +8952,9 @@ llvm::Value *CodeGenFunction::EmitX86CpuSupports(uint32_t FeaturesMask) {
Builder.CreateAlignedLoad(CpuFeatures, CharUnits::fromQuantity(4));
// Check the value of the bit corresponding to the feature requested.
- Value *Bitset = Builder.CreateAnd(
- Features, llvm::ConstantInt::get(Int32Ty, FeaturesMask));
- return Builder.CreateICmpNE(Bitset, llvm::ConstantInt::get(Int32Ty, 0));
+ Value *Mask = Builder.getInt32(FeaturesMask);
+ Value *Bitset = Builder.CreateAnd(Features, Mask);
+ return Builder.CreateICmpEQ(Bitset, Mask);
}
Value *CodeGenFunction::EmitX86CpuInit() {