[llvm-commits] [llvm] r92943 - in /llvm/trunk: lib/CodeGen/SelectionDAG/TargetLowering.cpp test/CodeGen/Generic/2009-04-28-i128-cmp-crash.ll

Duncan Sands baldrick at free.fr
Thu Jan 7 22:11:43 PST 2010


Hi Evan,

> -      unsigned ShAmt = cast<ConstantSDNode>(N0.getOperand(1))->getZExtValue();
> +      const APInt &ShAmt
> +        = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue();

if the shift amount is too big to fit in unsigned, then I guess the shift is
undefined, even on arbitrary precision integers.  So how about using going back
to unsigned but with getLimitedValue instead of getZExtValue?

Ciao,

Duncan,



More information about the llvm-commits mailing list