Skip to content

Commit 811c86c

Browse files
committed
change the ppc-vsx-fma-mutate pass work with -schedule-ppc-vsx-fma-mutation-early wqpass order
1 parent 9998f79 commit 811c86c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/Target/PowerPC/PPCTargetMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ void PPCPassConfig::addMachineSSAOptimization() {
561561

562562
void PPCPassConfig::addPreRegAlloc() {
563563
if (getOptLevel() != CodeGenOptLevel::None) {
564-
insertPass(VSXFMAMutateEarly ? &RegisterCoalescerID : &MachineSchedulerID,
564+
insertPass(VSXFMAMutateEarly ? &TwoAddressInstructionPassID : &MachineSchedulerID,
565565
&PPCVSXFMAMutateID);
566566
}
567567

llvm/test/CodeGen/PowerPC/vsx-fma-m-early.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ declare <4 x float> @llvm.fma.v4f32(<4 x float>, <4 x float>, <4 x float>)
4343
; CHECK-M-NEXT: bltlr cr0
4444
; CHECK-M-NEXT: # %bb.1: # %for.body.preheader
4545
; CHECK-M-NEXT: xxspltiw vs0, 1069066811
46+
; CHECK-M-NEXT: xxspltiw vs1, 1170469888
4647
; CHECK-M-NEXT: mtctr r5
4748
; CHECK-M-NEXT: li r5, 0
4849
; CHECK-M-NEXT: .align 5
4950
; CHECK-M-NEXT: L..BB0_2: # %for.body
5051
; CHECK-M-NEXT: # =>This Inner Loop Header: Depth=1
51-
; CHECK-M-NEXT: lxvx vs1, r4, r5
52-
; CHECK-M-NEXT: xxspltiw vs2, 1170469888
53-
; CHECK-M-NEXT: xvmaddasp vs2, vs1, vs0
52+
; CHECK-M-NEXT: lxvx vs2, r4, r5
53+
; CHECK-M-NEXT: xvmaddmsp vs2, vs0, vs1
5454
; CHECK-M-NEXT: stxvx vs2, r3, r5
5555
; CHECK-M-NEXT: addi r5, r5, 16
5656
; CHECK-M-NEXT: bdnz L..BB0_2

0 commit comments

Comments
 (0)