summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FastISel.cpp
diff options
context:
space:
mode:
authorZvi Rackover <zvi.rackover@intel.com>2016-11-15 13:50:35 +0000
committerZvi Rackover <zvi.rackover@intel.com>2016-11-15 13:50:35 +0000
commit6f76f46d2c153f879f946a8f933d0a5d869f1ef6 (patch)
treedb0cec0b4a777729f6b367431c79c7bb0cab3cc4 /llvm/lib/Target/X86/X86FastISel.cpp
parentc01faa383f212519687ee8113d55b1a8d04a5097 (diff)
downloadbcm5719-llvm-6f76f46d2c153f879f946a8f933d0a5d869f1ef6.tar.gz
bcm5719-llvm-6f76f46d2c153f879f946a8f933d0a5d869f1ef6.zip
[X86][FastISel] Assert that we are dealing with arithmetic with overflow intrinsics. NFC
llvm-svn: 286961
Diffstat (limited to 'llvm/lib/Target/X86/X86FastISel.cpp')
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index a6dbf758466..197943349cc 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -2769,6 +2769,9 @@ bool X86FastISel::fastLowerIntrinsicCall(const IntrinsicInst *II) {
const Function *Callee = II->getCalledFunction();
auto *Ty = cast<StructType>(Callee->getReturnType());
Type *RetTy = Ty->getTypeAtIndex(0U);
+ assert(Ty->getTypeAtIndex(1)->isIntegerTy() &&
+ Ty->getTypeAtIndex(1)->getScalarSizeInBits() == 1 &&
+ "Overflow value expected to be an i1");
MVT VT;
if (!isTypeLegal(RetTy, VT))
OpenPOWER on IntegriCloud