[llvm-commits] PATCH: Teach the x86 backend to fold mask & shift patterns into an addressing mode computation

Owen Anderson resistor at mac.com
Mon Jan 9 09:32:48 PST 2012


On Jan 9, 2012, at 4:20 AM, Chandler Carruth wrote:
>  
> +  SDValue NewShiftAmt = DAG.getConstant(ShiftAmt + AMShiftAmt, MVT::i8);
> 
> Please use getShiftAmountTy.
> 
> None of the other address mode computations use it. =/ It seems like goodness, but it requires threading a TargetLowing handle into this code. I've got 4 or 5 more patches queued up behind this that changing the interface in that way would make kind of annoying. I'd prefer to clean up all of the i8 shift types in one pass afterward. That sound good to you?

This isn't necessary.  This file is X86-specific (and isn't trying to handle vector shifts), so the shift type is fixed to MVT::i8.  getShiftAmountTy() is only needed in target-independent parts of codegen where you don't know what the shift type will be.

--Owen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120109/e251f2e3/attachment.html>


More information about the llvm-commits mailing list