[llvm] [AArch64][GlobalISel] Look through COPY and G_BITCAST while selecting fcvtl2 (fpext) (PR #65463)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 7 00:06:21 PDT 2023
================
@@ -6777,10 +6777,21 @@ AArch64InstructionSelector::selectExtractHigh(MachineOperand &Root) const {
MachineRegisterInfo &MRI =
Root.getParent()->getParent()->getParent()->getRegInfo();
- MachineInstr *Extract = getDefIgnoringCopies(Root.getReg(), MRI);
- if (Extract && Extract->getOpcode() == TargetOpcode::G_UNMERGE_VALUES &&
- Root.getReg() == Extract->getOperand(1).getReg()) {
- Register ExtReg = Extract->getOperand(2).getReg();
+ auto Extract = getDefSrcRegIgnoringCopies(Root.getReg(), MRI);
+ while (Extract && Extract->MI->getOpcode() == TargetOpcode::G_BITCAST)
----------------
davemgreen wrote:
Does this work for big endian? I'm not sure if big endian works for global isel at the moment, but I would prefer not to introduce a lot of subtle cases that assume bitcast does not alter lane layout.
https://github.com/llvm/llvm-project/pull/65463
More information about the llvm-commits
mailing list