[PATCH] D104409: GlobalISel/Utils: Refactor integer/float constant match functions

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 7 08:00:37 PDT 2021


Petar.Avramovic added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:354-356
+bool isGConstant(const MachineInstr *MI) {
+  return MI->getOpcode() == TargetOpcode::G_CONSTANT;
+}
----------------
I thought to make this public. There are many opcode checks like this, most often in asserts.
Do you find it useful?


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

https://reviews.llvm.org/D104409



More information about the llvm-commits mailing list