From afe87362c7e689caef576c410a8b7d7747d428df Mon Sep 17 00:00:00 2001 From: Zvi Rackover Date: Tue, 15 Nov 2016 13:50:35 +0000 Subject: [PATCH] [X86][FastISel] Assert that we are dealing with arithmetic with overflow intrinsics. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286961 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86FastISel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index a6dbf758466..197943349cc 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/lib/Target/X86/X86FastISel.cpp @@ -2769,6 +2769,9 @@ bool X86FastISel::fastLowerIntrinsicCall(const IntrinsicInst *II) { const Function *Callee = II->getCalledFunction(); auto *Ty = cast(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)) -- 2.50.1