[PATCH] D91714: AMDGPU/GlobalISel: Check values of constants in isKnownNeverNaN

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 08:41:57 PST 2020


arsenm 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:
> foad wrote:
> > Petar.Avramovic wrote:
> > > 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?
> > What does G_BUILD_VECTOR_TRUNC do on floating point types? Is it like G_TRUNC or G_FPTRUNC?
> Can be a separate patch
G_TRUNC, it's a bit discard only


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91714/new/

https://reviews.llvm.org/D91714



More information about the llvm-commits mailing list