[PATCH] D94450: [LegalizeDAG][RISCV][PowerPC][AMDGPU][WebAssembly] Improve expansion of SETONE/SETUEQ on targets without SETO/SETUO.

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 02:37:53 PST 2021


frasercrmck accepted this revision.
frasercrmck added a comment.

LGTM other than my suggestion.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1747
+        // If the SETUO or SETO CC isn't legal, we might be able to use
+        // SETOGT || SETOLT, inverting the result for SETUEQ.
+        CC2 = ((unsigned)CCCode & 0x8U) ? ISD::SETUO : ISD::SETO;
----------------
Minor, but maybe we could put into the comments the part of the commit message explaining why only one of OGT/OLT have to be legal for this to be worthwhile? I think that's quite useful background for anyone coming across this in the future.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94450



More information about the llvm-commits mailing list