On Tue, Oct 2, 2018 at 12:09 PM Kevin Neal <Kevin.Neal at sas.com> wrote:> If we don’t have constrained intrinsics for some of the fp math > instructions then aren’t we risking non-strict optimizations? >So far we've only added constrained FP intrinsics for operations that have side effects (i.e. can trap). The quiet-computational sign-bit operations are special. They never have side effects (i.e. never trap). We have not been able to find a bad transformation for those (i.e. a xform to a trapping operation) other than the FNEG(X) --> FSUB(-0.0, X) transform. If you can find a transform from one of the quiet-computational operations to a trapping operation, then we should discuss that. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181002/e247607d/attachment.html>
Can cos() trap? We have a constrained intrinsic for it. From: Cameron McInally <cameron.mcinally at nyu.edu> Sent: Tuesday, October 02, 2018 3:18 PM To: Kevin Neal <Kevin.Neal at sas.com> Cc: Sanjay Patel <spatel at rotateright.com>; LLVM Developers Mailing List <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] [FPEnv] FNEG instruction EXTERNAL On Tue, Oct 2, 2018 at 12:09 PM Kevin Neal <Kevin.Neal at sas.com<mailto:Kevin.Neal at sas.com>> wrote: If we don’t have constrained intrinsics for some of the fp math instructions then aren’t we risking non-strict optimizations? So far we've only added constrained FP intrinsics for operations that have side effects (i.e. can trap). -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181002/742369d0/attachment.html>
On Tue, Oct 2, 2018 at 3:47 PM Kevin Neal <Kevin.Neal at sas.com> wrote:> Can cos() trap? We have a constrained intrinsic for it. >cos() should signal INVALID on SNaNs and Infs, and signal INEXACT on inexact results. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181002/d0dc4f04/attachment.html>
> On Oct 3, 2018, at 04:47, Kevin Neal via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Can cos() trap? We have a constrained intrinsic for it. >Trapping isn’t the only reason there needs to be a constrained intrinsic. The rounding mode can also change it -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181003/f89aab59/attachment.html>