llvm.org GIT mirror llvm / f7f8380
[AArch64] Set COPY ZR isAsCheapAsAMove when needed. If a subtarget has both ZCZeroing and CustomCheapAsMoveHandling features (now only Kryo has both), set COPY (W|X)ZR isAsCheapAsAMove. Differential Revision: http://reviews.llvm.org/D22360 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275503 91177308-0d34-0410-b5e6-96231b3b80d8 Haicheng Wu 4 years ago
1 changed file(s) with 6 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
623623 case AArch64::MOVi64imm:
624624 return canBeExpandedToORR(MI, 64);
625625
626 // It is cheap to move #0 to float registers if the subtarget has
627 // ZeroCycleZeroing feature.
626 // It is cheap to zero out registers if the subtarget has ZeroCycleZeroing
627 // feature.
628628 case AArch64::FMOVS0:
629629 case AArch64::FMOVD0:
630630 return Subtarget.hasZeroCycleZeroing();
631 case TargetOpcode::COPY:
632 return (Subtarget.hasZeroCycleZeroing() &&
633 (MI.getOperand(1).getReg() == AArch64::WZR ||
634 MI.getOperand(1).getReg() == AArch64::XZR));
631635 }
632636
633637 llvm_unreachable("Unknown opcode to check as cheap as a move!");