[llvm] r214886 - [AVX512] alignr: Use suffix rather than name argument to multiclass

Adam Nemet anemet at apple.com
Tue Aug 5 10:22:52 PDT 2014


Author: anemet
Date: Tue Aug  5 12:22:52 2014
New Revision: 214886

URL: http://llvm.org/viewvc/llvm-project?rev=214886&view=rev
Log:
[AVX512] alignr: Use suffix rather than name argument to multiclass

Again no functional change.  This prepares for the suffix to be used with the
intrinsic matching.

Modified:
    llvm/trunk/lib/Target/X86/X86InstrAVX512.td

Modified: llvm/trunk/lib/Target/X86/X86InstrAVX512.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrAVX512.td?rev=214886&r1=214885&r2=214886&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrAVX512.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrAVX512.td Tue Aug  5 12:22:52 2014
@@ -4461,12 +4461,12 @@ def : Pat<(v8i64 (X86Shufp VR512:$src1,
                             (memopv8i64 addr:$src2), (i8 imm:$imm))),
           (VSHUFPDZrmi VR512:$src1, addr:$src2, imm:$imm)>;
 
-multiclass avx512_alignr<string OpcodeStr, RegisterClass RC,
+multiclass avx512_alignr<string Suffix, RegisterClass RC,
                           X86MemOperand x86memop, ValueType IntVT,
                           ValueType FloatVT> {
   def rri : AVX512AIi8<0x03, MRMSrcReg, (outs RC:$dst),
                      (ins RC:$src1, RC:$src2, i8imm:$src3),
-                     !strconcat(OpcodeStr,
+                     !strconcat("valign"##Suffix,
                      " \t{$src3, $src2, $src1, $dst|"
                          "$dst, $src1, $src2, $src3}"),
                      [(set RC:$dst,
@@ -4480,14 +4480,14 @@ multiclass avx512_alignr<string OpcodeSt
   let mayLoad = 1 in
   def rmi : AVX512AIi8<0x03, MRMSrcMem, (outs RC:$dst),
                      (ins RC:$src1, x86memop:$src2, i8imm:$src3),
-                     !strconcat(OpcodeStr,
+                     !strconcat("valign"##Suffix,
                      " \t{$src3, $src2, $src1, $dst|"
                          "$dst, $src1, $src2, $src3}"),
                      []>, EVEX_4V;
 }
-defm VALIGND : avx512_alignr<"valignd", VR512, i512mem, v16i32, v16f32>,
+defm VALIGND : avx512_alignr<"d", VR512, i512mem, v16i32, v16f32>,
                  EVEX_V512, EVEX_CD8<32, CD8VF>;
-defm VALIGNQ : avx512_alignr<"valignq", VR512, i512mem, v8i64, v8f64>,
+defm VALIGNQ : avx512_alignr<"q", VR512, i512mem, v8i64, v8f64>,
                  VEX_W, EVEX_V512, EVEX_CD8<64, CD8VF>;
 
 // Helper fragments to match sext vXi1 to vXiY.





More information about the llvm-commits mailing list