[PATCH] Fix an assert in legalization caused by 81f64c04

Matt Arsenault arsenm2 at gmail.com
Fri May 29 11:05:21 PDT 2015


> On May 29, 2015, at 10:51 AM, escha <escha at apple.com> wrote:
> 
> 
>     /// Returns a type large enough to hold any valid shift amount - before type
>     /// legalization these can be huge.
>     EVT getShiftAmountTy(EVT LHSTy) {
>       assert(LHSTy.isInteger() && "Shift amount is not an integer type!");
>       if (LHSTy.isVector())
>         return LHSTy;
>       return LegalTypes ? TLI.getScalarShiftAmountTy(LHSTy)
>                         : TLI.getPointerTy();
>     }
> 

I didn’t know about this one. Why does this exist? This seems insane. Does anything break if you replace everything with TLI.getShiftAmountTy()?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150529/fbe109a8/attachment.html>


More information about the llvm-commits mailing list