[PATCH] D91714: AMDGPU/GlobalISel: Check values of constants in isKnownNeverNaN
Petar Avramovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 08:38:43 PST 2020
Petar.Avramovic added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:476-481
+ if (DefMI->getOpcode() == TargetOpcode::G_BUILD_VECTOR) {
+ for (auto Op : DefMI->uses())
+ if (!isKnownNeverNaN(Op.getReg(), MRI, SNaN))
+ return false;
+ return true;
+ }
----------------
arsenm wrote:
> Also G_BUILD_VECTOR_TRUNC
I thought that G_BUILD_VECTOR_TRUNC and G_ANYEXT would have to be handled also but I don't have test for them. Might be required depending on order in with instructions are legalized (G_BUILD_VECTOR_TRUNC is not generated before legalizer). Should I add them anyway?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91714/new/
https://reviews.llvm.org/D91714
More information about the llvm-commits
mailing list