[PATCH] D99032: GlobalISel: Add FoldBinOpIntoSelect combine

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 06:52:37 PDT 2021


foad added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/Utils.h:319
+/// constant 0 integer (with no undefs if \p AllowUndefs is false). This will handle
+/// G_BUILD_VECTOR and G_BUILD_VECTOR TRUNC as truncation truncation is not an
+/// issue for null values.
----------------
"truncation truncation"?


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:904
+    const ConstantFP *FPImm = MI.getOperand(1).getFPImm();
+    return FPImm->isZero() && !FPImm->isNegative();
+  }
----------------
Could use isNullValue here too?


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

https://reviews.llvm.org/D99032



More information about the llvm-commits mailing list