[cfe-dev] A problem met during using -ftrapv

Duncan Sands baldrick at free.fr
Fri May 28 05:06:39 PDT 2010


Hi Eli,

>> I got the following error message:
>> clang: X86ISelLowering.cpp:7726: virtual void
>> llvm::X86TargetLowering::ReplaceNodeResults(llvm::SDNode*,
>> llvm::SmallVectorImpl<llvm::SDValue>&, llvm::SelectionDAG&) const:
>> Assertion `false&&  "Do not know how to custom type legalize this
>> operation!"' failed.
>
> Looks like the x86-32 backend doesn't handle
> @llvm.sadd.with.overflow.i64 correctly; please file in Bugzilla.

I'm a bit surprised, because LegalizeTypes has logic for overflow operations:

   case ISD::SADDO:
   case ISD::SSUBO:       Res = PromoteIntRes_SADDSUBO(N, ResNo); break;
   case ISD::UADDO:
   case ISD::USUBO:       Res = PromoteIntRes_UADDSUBO(N, ResNo); break;
   case ISD::SMULO:
   case ISD::UMULO:       Res = PromoteIntRes_XMULO(N, ResNo); break;

Ciao,

Duncan.



More information about the cfe-dev mailing list