[llvm] [CodeGen] [ARM] Make RISC-V Init Undef Pass Target Independent and add support for the ARM Architecture. (PR #77770)
Jack Styles via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 1 06:41:42 PST 2024
================
@@ -152,7 +118,7 @@ bool RISCVInitUndef::handleReg(MachineInstr *MI) {
continue;
if (!UseMO.getReg().isVirtual())
continue;
- if (!isVectorRegClass(UseMO.getReg()))
+ if (!TII->isVectorRegClass(MRI->getRegClass(UseMO.getReg())))
----------------
Stylie777 wrote:
I think this function name can be changed. Something along the lines of `isRegClassSupportedByInitUndef` as that is what this function is checking. This ensures there is a Pseudo Instruction that can be used for that register type.
early-clobber is ensured using the static function `isEarlyClobberMI` which runs before this step is reached. If the Machine Instruction is not early-clobber then it is skipped.
https://github.com/llvm/llvm-project/pull/77770
More information about the llvm-commits
mailing list