[llvm] r286961 - [X86][FastISel] Assert that we are dealing with arithmetic with overflow intrinsics. NFC
Zvi Rackover via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 15 05:50:36 PST 2016
Author: zvi
Date: Tue Nov 15 07:50:35 2016
New Revision: 286961
URL: http://llvm.org/viewvc/llvm-project?rev=286961&view=rev
Log:
[X86][FastISel] Assert that we are dealing with arithmetic with overflow intrinsics. NFC
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=286961&r1=286960&r2=286961&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Nov 15 07:50:35 2016
@@ -2769,6 +2769,9 @@ bool X86FastISel::fastLowerIntrinsicCall
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))
More information about the llvm-commits
mailing list