[PATCH] D110579: [AMDGPU] Add two new intrinsics to control fp_trunc rounding mode
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 12 01:19:38 PST 2022
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:6337
+ const Function *F = I.getCalledFunction();
+ bool HasChain = !F->doesNotAccessMemory();
+ bool OnlyLoad = HasChain && F->onlyReadsMemory();
----------------
craig.topper wrote:
> craig.topper wrote:
> > Why would this intrinsic ever have a chain?
> Err. I guess the intrinsic attributes are defined to always have a Chain. Should it be IntrNoMem instead?
IIUC, if the rounding mode is allowed to be "dynamic" then the intrinsic needs to be IntrInaccessibleMemOnly (just like the constrained fp intrinsics). If we don't allow "dynamic" then it could be IntrNoMem.
Personally I have no interest in supporting "dynamic" so I would vote for disallowing it and making the intrinsic IntrNoMem.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110579/new/
https://reviews.llvm.org/D110579
More information about the llvm-commits
mailing list