[llvm-commits] [llvm] r154778 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx2-intrinsics-x86.ll

Craig Topper craig.topper at gmail.com
Mon Apr 16 14:13:51 PDT 2012


Looks like they aren't in 3.0 so we should be good.

Can the earlier intrinsics upgrades I did in AutoUpgrade be removed after
the 3.1 branch?

On Mon, Apr 16, 2012 at 11:52 AM, Chris Lattner <clattner at apple.com> wrote:

>
> On Apr 15, 2012, at 3:43 PM, Craig Topper wrote:
>
> > Author: ctopper
> > Date: Sun Apr 15 17:43:31 2012
> > New Revision: 154778
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=154778&view=rev
> > Log:
> > Remove AVX2 vpermq and vpermpd intrinsics. These can now be handled with
> normal shuffle vectors.
>
> Nice!  Were these intrinsics supported in previous released versions of
> llvm?  If so, we'll need autoupgrade (lib/VMCore/AutoUpgrade.cpp) logic to
> turn the intrinsic (in old bc files) into the shufflevector.
>
> -Chris
>
> >
> > Modified:
> >    llvm/trunk/include/llvm/IntrinsicsX86.td
> >    llvm/trunk/lib/Target/X86/X86InstrSSE.td
> >    llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll
> >
> > Modified: llvm/trunk/include/llvm/IntrinsicsX86.td
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=154778&r1=154777&r2=154778&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/include/llvm/IntrinsicsX86.td (original)
> > +++ llvm/trunk/include/llvm/IntrinsicsX86.td Sun Apr 15 17:43:31 2012
> > @@ -1659,15 +1659,9 @@
> >   def int_x86_avx2_permd : GCCBuiltin<"__builtin_ia32_permvarsi256">,
> >               Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty],
> >                         [IntrNoMem]>;
> > -  def int_x86_avx2_permq : GCCBuiltin<"__builtin_ia32_permdi256">,
> > -              Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_i8_ty],
> > -                        [IntrNoMem]>;
> >   def int_x86_avx2_permps : GCCBuiltin<"__builtin_ia32_permvarsf256">,
> >               Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty],
> >                         [IntrNoMem]>;
> > -  def int_x86_avx2_permpd : GCCBuiltin<"__builtin_ia32_permdf256">,
> > -              Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_i8_ty],
> > -                        [IntrNoMem]>;
> >   def int_x86_avx2_vperm2i128 : GCCBuiltin<"__builtin_ia32_permti256">,
> >               Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty,
> >                          llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>;
> >
> > Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=154778&r1=154777&r2=154778&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
> > +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Sun Apr 15 17:43:31 2012
> > @@ -7755,24 +7755,26 @@
> > defm VPERMPS : avx2_perm<0x16, "vpermps", memopv8f32,
> int_x86_avx2_permps>;
> >
> > multiclass avx2_perm_imm<bits<8> opc, string OpcodeStr, PatFrag mem_frag,
> > -                         Intrinsic Int> {
> > +                         SDNode OpNode, ValueType OpVT> {
> >   def Yri : AVX2AIi8<opc, MRMSrcReg, (outs VR256:$dst),
> >                      (ins VR256:$src1, i8imm:$src2),
> >                      !strconcat(OpcodeStr,
> >                          "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
> > -                     [(set VR256:$dst, (Int VR256:$src1, imm:$src2))]>,
> VEX;
> > +                     [(set VR256:$dst,
> > +                       (OpVT (OpNode VR256:$src1, (i8 imm:$src2))))]>,
> VEX;
> >   def Ymi : AVX2AIi8<opc, MRMSrcMem, (outs VR256:$dst),
> >                      (ins i256mem:$src1, i8imm:$src2),
> >                      !strconcat(OpcodeStr,
> >                          "\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
> > -                     [(set VR256:$dst, (Int (mem_frag addr:$src1),
> imm:$src2))]>,
> > +                     [(set VR256:$dst,
> > +                       (OpVT (OpNode (mem_frag addr:$src1), (i8
> imm:$src2))))]>,
> >                      VEX;
> > }
> >
> > -defm VPERMQ : avx2_perm_imm<0x00, "vpermq", memopv4i64,
> int_x86_avx2_permq>,
> > +defm VPERMQ : avx2_perm_imm<0x00, "vpermq", memopv4i64, X86VPermq,
> v4i64>,
> >                             VEX_W;
> > let ExeDomain = SSEPackedDouble in
> > -defm VPERMPD : avx2_perm_imm<0x01, "vpermpd", memopv4f64,
> int_x86_avx2_permpd>,
> > +defm VPERMPD : avx2_perm_imm<0x01, "vpermpd", memopv4f64, X86VPermpd,
> v4f64>,
> >                              VEX_W;
> >
> > let Predicates = [HasAVX2] in {
> > @@ -7780,22 +7782,11 @@
> >           (VPERMDYrr VR256:$src1, VR256:$src2)>;
> > def : Pat<(v8f32 (X86VPermps VR256:$src1, VR256:$src2)),
> >           (VPERMPSYrr VR256:$src1, VR256:$src2)>;
> > -
> > -def : Pat<(v4i64 (X86VPermq VR256:$src1, (i8 imm:$imm))),
> > -          (VPERMQYri VR256:$src1, imm:$imm)>;
> > -def : Pat<(v4f64 (X86VPermpd VR256:$src1, (i8 imm:$imm))),
> > -          (VPERMPDYri VR256:$src1, imm:$imm)>;
> >
> > -def : Pat<(v8i32 (X86VPermps VR256:$src1, (bc_v8i32 (memopv4i64
> addr:$src2)))),
> > +def : Pat<(v8i32 (X86VPermd VR256:$src1, (bc_v8i32 (memopv4i64
> addr:$src2)))),
> >           (VPERMDYrm VR256:$src1, addr:$src2)>;
> > def : Pat<(v8f32 (X86VPermps VR256:$src1, (memopv8f32 addr:$src2))),
> >           (VPERMPSYrm VR256:$src1, addr:$src2)>;
> > -
> > -def : Pat<(v4i64 (X86VPermq (memopv4i64 addr:$src1), (i8 imm:$imm))),
> > -          (VPERMQYmi addr:$src1, imm:$imm)>;
> > -def : Pat<(v4f64 (X86VPermpd (memopv4f64 addr:$src1), (i8 imm:$imm))),
> > -          (VPERMPDYmi addr:$src1, imm:$imm)>;
> > -
> > }
> >
> >
> //===----------------------------------------------------------------------===//
> >
> > Modified: llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll?rev=154778&r1=154777&r2=154778&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll (original)
> > +++ llvm/trunk/test/CodeGen/X86/avx2-intrinsics-x86.ll Sun Apr 15
> 17:43:31 2012
> > @@ -800,22 +800,6 @@
> > declare <8 x float> @llvm.x86.avx2.permps(<8 x float>, <8 x float>)
> nounwind readonly
> >
> >
> > -define <4 x i64> @test_x86_avx2_permq(<4 x i64> %a0) {
> > -  ; CHECK: vpermq
> > -  %res = call <4 x i64> @llvm.x86.avx2.permq(<4 x i64> %a0, i8 7) ; <<4
> x i64>> [#uses=1]
> > -  ret <4 x i64> %res
> > -}
> > -declare <4 x i64> @llvm.x86.avx2.permq(<4 x i64>, i8) nounwind readonly
> > -
> > -
> > -define <4 x double> @test_x86_avx2_permpd(<4 x double> %a0) {
> > -  ; CHECK: vpermpd
> > -  %res = call <4 x double> @llvm.x86.avx2.permpd(<4 x double> %a0, i8
> 7) ; <<4 x double>> [#uses=1]
> > -  ret <4 x double> %res
> > -}
> > -declare <4 x double> @llvm.x86.avx2.permpd(<4 x double>, i8) nounwind
> readonly
> > -
> > -
> > define <4 x i64> @test_x86_avx2_vperm2i128(<4 x i64> %a0, <4 x i64> %a1)
> {
> >   ; CHECK: vperm2i128
> >   %res = call <4 x i64> @llvm.x86.avx2.vperm2i128(<4 x i64> %a0, <4 x
> i64> %a1, i8 1) ; <<4 x i64>> [#uses=1]
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>


-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120416/b65dc011/attachment.html>


More information about the llvm-commits mailing list