[PATCH] R600/SI: implement range reduction for sin/cos

Grigori Goronzy greg at chown.ath.cx
Fri Jun 20 12:30:50 PDT 2014


On 20.06.2014 21:14, Tom Stellard wrote:
> On Fri, Jun 20, 2014 at 07:27:11PM +0200, Grigori Goronzy wrote:
>> These instructions can only take a limited input range, and return
>> the constant value 1 out of range. We should do range reduction to
>> be able to process arbitrary values. Use a FRACT instruction after
>> normalization to achieve this.
> 
> There is code in R600ISelLowering.cpp that does something similar:
> R600TargetLowering::LowerTrig().  Could we re-use that code here, or
> implement something similar is SIISelLowering.cpp?
>

I'll look into it. The last time I tested it (with GL shaders), sin/cos
with large values was broken with Evergreen though, so did that code
ever work correctly?

Best regards
Grigori

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140620/96b6556a/attachment.sig>


More information about the llvm-commits mailing list