[PATCH] D78986: [PowerPC-QPX] adjust operands order of qpx vector fma instructions.

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 16:46:20 PDT 2020


shchenz updated this revision to Diff 260798.
shchenz added a comment.

rebase


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78986/new/

https://reviews.llvm.org/D78986

Files:
  llvm/lib/Target/PowerPC/PPCInstrQPX.td
  llvm/test/CodeGen/PowerPC/qpx-qvfmadd.ll


Index: llvm/test/CodeGen/PowerPC/qpx-qvfmadd.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/qpx-qvfmadd.ll
+++ llvm/test/CodeGen/PowerPC/qpx-qvfmadd.ll
@@ -3,7 +3,7 @@
 
 define <2 x double> @test_qvfmadd(<2 x double> %0, <2 x double> %1, <2 x double> %2) {
 ; CHECK: test_qvfmadd
-; CHECK: QVFMADD %2, %0, %1, implicit $rm
+; CHECK: QVFMADD %2, %1, %0, implicit $rm
 ;
   %4 = fmul reassoc nsz <2 x double> %2, %1
   %5 = fadd reassoc nsz <2 x double> %4, %0
@@ -12,7 +12,7 @@
 
 define <4 x float> @test_qvfmadds(<4 x float> %0, <4 x float> %1, <4 x float> %2) {
 ; CHECK: test_qvfmadds
-; CHECK: QVFMADDSs %2, %0, %1, implicit $rm
+; CHECK: QVFMADDSs %2, %1, %0, implicit $rm
 ;
   %4 = fmul reassoc nsz <4 x float> %2, %1
   %5 = fadd reassoc nsz <4 x float> %4, %0
Index: llvm/lib/Target/PowerPC/PPCInstrQPX.td
===================================================================
--- llvm/lib/Target/PowerPC/PPCInstrQPX.td
+++ llvm/lib/Target/PowerPC/PPCInstrQPX.td
@@ -167,13 +167,13 @@
 
   // Multiply-add instructions
   def QVFMADD : AForm_1<4, 29,
-                      (outs qfrc:$FRT), (ins qfrc:$FRA, qfrc:$FRB, qfrc:$FRC),
+                      (outs qfrc:$FRT), (ins qfrc:$FRA, qfrc:$FRC, qfrc:$FRB),
                       "qvfmadd $FRT, $FRA, $FRC, $FRB", IIC_FPFused,
                       [(set v4f64:$FRT, (fma v4f64:$FRA, v4f64:$FRC, v4f64:$FRB))]>;
   let isCodeGenOnly = 1 in
     def QVFMADDS : QPXA1_Int<0, 29, "qvfmadds", int_ppc_qpx_qvfmadds>;
   def QVFMADDSs : AForm_1<0, 29,
-                        (outs qsrc:$FRT), (ins qsrc:$FRA, qsrc:$FRB, qsrc:$FRC),
+                        (outs qsrc:$FRT), (ins qsrc:$FRA, qsrc:$FRC, qsrc:$FRB),
                         "qvfmadds $FRT, $FRA, $FRC, $FRB", IIC_FPFused,
                         [(set v4f32:$FRT, (fma v4f32:$FRA, v4f32:$FRC, v4f32:$FRB))]>;
   def QVFNMADD : AForm_1<4, 31,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78986.260798.patch
Type: text/x-patch
Size: 1920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200428/f57d107c/attachment.bin>


More information about the llvm-commits mailing list