[PATCH] D28508: [NVPTX] Lower to sqrt.approx and rsqrt.approx under more circumstances.

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 13:16:06 PST 2017


tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.

One small nit,  looks good otherwise.



================
Comment at: llvm/lib/Target/NVPTX/NVPTXInstrInfo.td:767-775
+                   !strconcat("sqrt.", Options, "f32 \t$dst, $a;"),
+                   [(set Float32Regs:$dst, (fsqrt Float32Regs:$a))]>,
+                   Requires<Preds>;
+}
+defm FSQRT_f32_approx_ftz :
+  FSQRT_f32<"approx.ftz.", [doF32FTZ, do_SQRTF32_APPROX]>;
+defm FSQRT_f32_approx : FSQRT_f32<"approx.", [do_SQRTF32_APPROX]>;
----------------
Nit. I'd use period as prefix everywhere which is closer to the way types and instruction options are used (almost) everywhere else.
I.e. :
```
!strconcat("sqrt", Options, ".f32 \t$dst, $a;"),
...
defm FSQRT_f32_ftz : FSQRT_f32<".rn.ftz", [doF32FTZ]>;

```




https://reviews.llvm.org/D28508





More information about the llvm-commits mailing list