forked from OSchip/llvm-project
[X86] Mark XOP vpmac* and vpmadc intrinsics as being commutative so that tablegen will generate patterns with the load in operand 0.
This allows loads to be folded during isel without the peephole pass. llvm-svn: 325548
This commit is contained in:
parent
a05ed17316
commit
41f64c3204
|
@ -3056,62 +3056,62 @@ let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
|
|||
GCCBuiltin<"__builtin_ia32_vpmacsdd">,
|
||||
Intrinsic<[llvm_v4i32_ty],
|
||||
[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmacsdqh :
|
||||
GCCBuiltin<"__builtin_ia32_vpmacsdqh">,
|
||||
Intrinsic<[llvm_v2i64_ty],
|
||||
[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v2i64_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmacsdql :
|
||||
GCCBuiltin<"__builtin_ia32_vpmacsdql">,
|
||||
Intrinsic<[llvm_v2i64_ty],
|
||||
[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v2i64_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmacssdd :
|
||||
GCCBuiltin<"__builtin_ia32_vpmacssdd">,
|
||||
Intrinsic<[llvm_v4i32_ty],
|
||||
[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmacssdqh :
|
||||
GCCBuiltin<"__builtin_ia32_vpmacssdqh">,
|
||||
Intrinsic<[llvm_v2i64_ty],
|
||||
[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v2i64_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmacssdql :
|
||||
GCCBuiltin<"__builtin_ia32_vpmacssdql">,
|
||||
Intrinsic<[llvm_v2i64_ty],
|
||||
[llvm_v4i32_ty, llvm_v4i32_ty, llvm_v2i64_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmacsswd :
|
||||
GCCBuiltin<"__builtin_ia32_vpmacsswd">,
|
||||
Intrinsic<[llvm_v4i32_ty],
|
||||
[llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4i32_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmacssww :
|
||||
GCCBuiltin<"__builtin_ia32_vpmacssww">,
|
||||
Intrinsic<[llvm_v8i16_ty],
|
||||
[llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmacswd :
|
||||
GCCBuiltin<"__builtin_ia32_vpmacswd">,
|
||||
Intrinsic<[llvm_v4i32_ty],
|
||||
[llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4i32_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmacsww :
|
||||
GCCBuiltin<"__builtin_ia32_vpmacsww">,
|
||||
Intrinsic<[llvm_v8i16_ty],
|
||||
[llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmadcsswd :
|
||||
GCCBuiltin<"__builtin_ia32_vpmadcsswd">,
|
||||
Intrinsic<[llvm_v4i32_ty],
|
||||
[llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4i32_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpmadcswd :
|
||||
GCCBuiltin<"__builtin_ia32_vpmadcswd">,
|
||||
Intrinsic<[llvm_v4i32_ty],
|
||||
[llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4i32_ty],
|
||||
[IntrNoMem]>;
|
||||
[IntrNoMem, Commutative]>;
|
||||
def int_x86_xop_vpperm :
|
||||
GCCBuiltin<"__builtin_ia32_vpperm">,
|
||||
Intrinsic<[llvm_v16i8_ty],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+avx,+xop | FileCheck %s --check-prefix=X32
|
||||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx,+xop | FileCheck %s --check-prefix=X64
|
||||
; RUN: llc < %s -disable-peephole -mtriple=i686-unknown-unknown -mattr=+avx,+xop | FileCheck %s --check-prefix=X32
|
||||
; RUN: llc < %s -disable-peephole -mtriple=x86_64-unknown-unknown -mattr=+avx,+xop | FileCheck %s --check-prefix=X64
|
||||
|
||||
define <16 x i8> @commute_fold_vpcomb(<16 x i8>* %a0, <16 x i8> %a1) {
|
||||
; X32-LABEL: commute_fold_vpcomb:
|
||||
|
|
Loading…
Reference in New Issue