[PATCH] R600: Make sign_extend_inreg legal.

Jan Vesely jan.vesely at rutgers.edu
Tue Apr 8 17:23:24 PDT 2014


Hi,

I finally got some time to improve the tests. My original issue with
*_generated piglits got fixed in the mean time. (My bets are it was
R600: Correct opcode for BFE_INT :).

I tried to use your latest patch to base the tests on but it did not
apply cleanly on master.

I have attached another patch(0001), that is based on your idea and
managed to get llvm do the scalarization, so no custom procedures are
necessary for EG hw.

regards,
Jan


On Wed, 2014-04-02 at 16:09 -0700, Matt Arsenault wrote:
> On 04/02/2014 03:28 PM, Jan Vesely wrote:
> > Hi,
> >
> > On Tue, 2014-04-01 at 11:34 -0700, Matt Arsenault wrote:
> >> I don't know why I didn't just do this before
> >>
> >> http://llvm-reviews.chandlerc.com/D3250
> > I have two questions. I'm still learning llvm internals so pls bear with
> > me.
> >
> >> +  if (!VT.isVector())
> >> +    return SDValue();
> > Is it possible to call the function on scalar types?
> It's possible (and it was before), but now this might be unnecessary.
> 
> > I assume the default is Legal, and the patch only changes it to expand for i1, i8, i16.
> The default is legal, but this does the opposite. It lets i1, i8, and 
> i16 go back to the default
> 
> > Also given that the LowerSIGN_EXTEND_INREG, how is it different from using setOperationAction(Expand)?
> > Is it kept around because of the EG TODO?
> It's mostly kept around to scalarize it. IIRC the implementation for 
> expand sign_extend_inreg for vectors wasn't doing what I wanted and 
> creating a pair of vector shifts instead, although looking at what it 
> does now I think it should work. I can try it again using the default 
> expand.
> 
> >
> > thank you,
> > Jan
> >
> > PS: I apologize for not responding to that test request yet. These few weeks are rather busy for me.
> >
> >
> >> Files:
> >>    lib/Target/R600/AMDGPUISelLowering.cpp
> >>    lib/Target/R600/EvergreenInstructions.td
> >>    lib/Target/R600/SIISelLowering.cpp
> >>    lib/Target/R600/SIInstructions.td
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> 

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-R600-Expand-sign-extension-of-vectors.patch
Type: text/x-patch
Size: 4778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140408/f94c5268/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-R600-tests-Extend-r600-sign_extend_inreg-tests-for-E.patch
Type: text/x-patch
Size: 9641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140408/f94c5268/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140408/f94c5268/attachment.sig>


More information about the llvm-commits mailing list