[PATCH] D110786: [GlobalISel] Extend G_SELECT of known condition combine to vectors.
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 29 16:57:31 PDT 2021
aemerson added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/Utils.cpp:1019-1030
+Optional<APInt>
+llvm::isConstantOrConstantVector(MachineInstr &MI,
+ const MachineRegisterInfo &MRI) {
+ Register Def = MI.getOperand(0).getReg();
+ if (auto C = getIConstantVRegValWithLookThrough(Def, MRI))
+ return C->Value;
+ auto RegOrCst = getBuildVectorConstantSplat(MI, MRI);
----------------
Actually this doesn't have the same meaning as the DAG counterpart. This one only checks for constant scalars or splats of scalars. I'll rename this to make it clear.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110786/new/
https://reviews.llvm.org/D110786
More information about the llvm-commits
mailing list