frem x, {+,-}inf must return x to match the specification of LLVM's frem.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/NVPTX/NVPTXInstrInfo.td | ||
---|---|---|
681 | Maybe give these more canonical names? Something like 'TESTINF_f32r`. The f is redundant (there is no inf for int) but is more in line with how things are named where the suffix after _ is the type. |
llvm/lib/Target/NVPTX/NVPTXInstrInfo.td | ||
---|---|---|
605 | Nit: It's more of a TODO, IMO. :-) I wonder if the instruction actually provides any benefit over cmp+selp on the SASS level. I suspect that it probably does not, and implementing it would just give us a bit nicer PTX w/o much of an effect on the actual GPU code. | |
1312–1313 | This would add selp+testinf unconditionally to all frem lowerings. While it is correct, I wonder if we may want to avoid that when we're in fast-math mode when we only care about finite math. |
Nit: It's more of a TODO, IMO. :-)
I wonder if the instruction actually provides any benefit over cmp+selp on the SASS level. I suspect that it probably does not, and implementing it would just give us a bit nicer PTX w/o much of an effect on the actual GPU code.