From: Zvi Rackover Date: Tue, 15 Nov 2016 13:50:35 +0000 (+0000) Subject: [X86][FastISel] Assert that we are dealing with arithmetic with overflow intrinsics... X-Git-Tag: llvmorg-4.0.0-rc1~4545 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f76f46d2c153f879f946a8f933d0a5d869f1ef6;p=platform%2Fupstream%2Fllvm.git [X86][FastISel] Assert that we are dealing with arithmetic with overflow intrinsics. NFC llvm-svn: 286961 --- diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index a6dbf75..1979433 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(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))