[llvm] r303010 - [X86][XOP] Account for cost of extract/insert of 256-bit vector shifts
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun May 14 06:38:54 PDT 2017
Author: rksimon
Date: Sun May 14 08:38:53 2017
New Revision: 303010
URL: http://llvm.org/viewvc/llvm-project?rev=303010&view=rev
Log:
[X86][XOP] Account for cost of extract/insert of 256-bit vector shifts
Modified:
llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/trunk/test/Analysis/CostModel/X86/vshift-ashr-cost.ll
llvm/trunk/test/Analysis/CostModel/X86/vshift-lshr-cost.ll
llvm/trunk/test/Analysis/CostModel/X86/vshift-shl-cost.ll
Modified: llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp?rev=303010&r1=303009&r2=303010&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp Sun May 14 08:38:53 2017
@@ -430,18 +430,18 @@ int X86TTIImpl::getArithmeticInstrCost(
{ ISD::SRL, MVT::v2i64, 2 },
{ ISD::SRA, MVT::v2i64, 2 },
// 256bit shifts require splitting if AVX2 didn't catch them above.
- { ISD::SHL, MVT::v32i8, 2 },
- { ISD::SRL, MVT::v32i8, 4 },
- { ISD::SRA, MVT::v32i8, 4 },
- { ISD::SHL, MVT::v16i16, 2 },
- { ISD::SRL, MVT::v16i16, 4 },
- { ISD::SRA, MVT::v16i16, 4 },
- { ISD::SHL, MVT::v8i32, 2 },
- { ISD::SRL, MVT::v8i32, 4 },
- { ISD::SRA, MVT::v8i32, 4 },
- { ISD::SHL, MVT::v4i64, 2 },
- { ISD::SRL, MVT::v4i64, 4 },
- { ISD::SRA, MVT::v4i64, 4 },
+ { ISD::SHL, MVT::v32i8, 2+2 },
+ { ISD::SRL, MVT::v32i8, 4+2 },
+ { ISD::SRA, MVT::v32i8, 4+2 },
+ { ISD::SHL, MVT::v16i16, 2+2 },
+ { ISD::SRL, MVT::v16i16, 4+2 },
+ { ISD::SRA, MVT::v16i16, 4+2 },
+ { ISD::SHL, MVT::v8i32, 2+2 },
+ { ISD::SRL, MVT::v8i32, 4+2 },
+ { ISD::SRA, MVT::v8i32, 4+2 },
+ { ISD::SHL, MVT::v4i64, 2+2 },
+ { ISD::SRL, MVT::v4i64, 4+2 },
+ { ISD::SRA, MVT::v4i64, 4+2 },
};
// Look for XOP lowering tricks.
Modified: llvm/trunk/test/Analysis/CostModel/X86/vshift-ashr-cost.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/vshift-ashr-cost.ll?rev=303010&r1=303009&r2=303010&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/vshift-ashr-cost.ll (original)
+++ llvm/trunk/test/Analysis/CostModel/X86/vshift-ashr-cost.ll Sun May 14 08:38:53 2017
@@ -36,7 +36,7 @@ define <4 x i64> @var_shift_v4i64(<4 x i
; AVX: Found an estimated cost of 24 for instruction: %shift
; AVX2: Found an estimated cost of 4 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = ashr <4 x i64> %a, %b
ret <4 x i64> %shift
}
@@ -48,7 +48,7 @@ define <8 x i64> @var_shift_v8i64(<8 x i
; AVX: Found an estimated cost of 48 for instruction: %shift
; AVX2: Found an estimated cost of 8 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = ashr <8 x i64> %a, %b
ret <8 x i64> %shift
}
@@ -73,7 +73,7 @@ define <8 x i32> @var_shift_v8i32(<8 x i
; AVX: Found an estimated cost of 24 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = ashr <8 x i32> %a, %b
ret <8 x i32> %shift
@@ -86,7 +86,7 @@ define <16 x i32> @var_shift_v16i32(<16
; AVX: Found an estimated cost of 48 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = ashr <16 x i32> %a, %b
ret <16 x i32> %shift
@@ -113,7 +113,7 @@ define <16 x i16> @var_shift_v16i16(<16
; AVX2: Found an estimated cost of 10 for instruction: %shift
; AVX512F: Found an estimated cost of 10 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = ashr <16 x i16> %a, %b
ret <16 x i16> %shift
}
@@ -126,7 +126,7 @@ define <32 x i16> @var_shift_v32i16(<32
; AVX2: Found an estimated cost of 20 for instruction: %shift
; AVX512F: Found an estimated cost of 20 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = ashr <32 x i16> %a, %b
ret <32 x i16> %shift
}
@@ -151,7 +151,7 @@ define <32 x i8> @var_shift_v32i8(<32 x
; AVX2: Found an estimated cost of 24 for instruction: %shift
; AVX512F: Found an estimated cost of 24 for instruction: %shift
; AVX512BW: Found an estimated cost of 24 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = ashr <32 x i8> %a, %b
ret <32 x i8> %shift
}
@@ -164,7 +164,7 @@ define <64 x i8> @var_shift_v64i8(<64 x
; AVX2: Found an estimated cost of 48 for instruction: %shift
; AVX512F: Found an estimated cost of 48 for instruction: %shift
; AVX512BW: Found an estimated cost of 24 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = ashr <64 x i8> %a, %b
ret <64 x i8> %shift
}
@@ -194,8 +194,7 @@ define <4 x i64> @splatvar_shift_v4i64(<
; AVX: Found an estimated cost of 8 for instruction: %shift
; AVX2: Found an estimated cost of 8 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
-; XOPAVX2: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%insert = insertelement <4 x i64> undef, i64 %b, i32 0
%splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
%shift = ashr <4 x i64> %a, %splat
@@ -209,8 +208,7 @@ define <8 x i64> @splatvar_shift_v8i64(<
; AVX: Found an estimated cost of 16 for instruction: %shift
; AVX2: Found an estimated cost of 16 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
-; XOPAVX2: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%insert = insertelement <8 x i64> undef, i64 %b, i32 0
%splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
%shift = ashr <8 x i64> %a, %splat
@@ -238,7 +236,7 @@ define <8 x i32> @splatvar_shift_v8i32(<
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%insert = insertelement <8 x i32> undef, i32 %b, i32 0
%splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
@@ -253,7 +251,7 @@ define <16 x i32> @splatvar_shift_v16i32
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%insert = insertelement <16 x i32> undef, i32 %b, i32 0
%splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
@@ -282,7 +280,7 @@ define <16 x i16> @splatvar_shift_v16i16
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%insert = insertelement <16 x i16> undef, i16 %b, i32 0
%splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
@@ -298,7 +296,7 @@ define <32 x i16> @splatvar_shift_v32i16
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512F: Found an estimated cost of 2 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%insert = insertelement <32 x i16> undef, i16 %b, i32 0
%splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
@@ -327,7 +325,7 @@ define <32 x i8> @splatvar_shift_v32i8(<
; AVX: Found an estimated cost of 48 for instruction: %shift
; AVX2: Found an estimated cost of 24 for instruction: %shift
; AVX512: Found an estimated cost of 24 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%insert = insertelement <32 x i8> undef, i8 %b, i32 0
%splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
%shift = ashr <32 x i8> %a, %splat
@@ -342,7 +340,7 @@ define <64 x i8> @splatvar_shift_v64i8(<
; AVX2: Found an estimated cost of 48 for instruction: %shift
; AVX512F: Found an estimated cost of 48 for instruction: %shift
; AVX512BW: Found an estimated cost of 24 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%insert = insertelement <64 x i8> undef, i8 %b, i32 0
%splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
%shift = ashr <64 x i8> %a, %splat
@@ -372,7 +370,7 @@ define <4 x i64> @constant_shift_v4i64(<
; AVX: Found an estimated cost of 24 for instruction: %shift
; AVX2: Found an estimated cost of 4 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = ashr <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
ret <4 x i64> %shift
}
@@ -384,7 +382,7 @@ define <8 x i64> @constant_shift_v8i64(<
; AVX: Found an estimated cost of 48 for instruction: %shift
; AVX2: Found an estimated cost of 8 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = ashr <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
ret <8 x i64> %shift
}
@@ -409,7 +407,7 @@ define <8 x i32> @constant_shift_v8i32(<
; AVX: Found an estimated cost of 24 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = ashr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
ret <8 x i32> %shift
@@ -422,7 +420,7 @@ define <16 x i32> @constant_shift_v16i32
; AVX: Found an estimated cost of 48 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = ashr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
ret <16 x i32> %shift
@@ -449,7 +447,7 @@ define <16 x i16> @constant_shift_v16i16
; AVX2: Found an estimated cost of 10 for instruction: %shift
; AVX512F: Found an estimated cost of 10 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <16 x i16> %shift
}
@@ -462,7 +460,7 @@ define <32 x i16> @constant_shift_v32i16
; AVX2: Found an estimated cost of 20 for instruction: %shift
; AVX512F: Found an estimated cost of 20 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = ashr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <32 x i16> %shift
}
@@ -486,7 +484,7 @@ define <32 x i8> @constant_shift_v32i8(<
; AVX: Found an estimated cost of 48 for instruction: %shift
; AVX2: Found an estimated cost of 24 for instruction: %shift
; AVX512: Found an estimated cost of 24 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = ashr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
ret <32 x i8> %shift
}
@@ -499,7 +497,7 @@ define <64 x i8> @constant_shift_v64i8(<
; AVX2: Found an estimated cost of 48 for instruction: %shift
; AVX512F: Found an estimated cost of 48 for instruction: %shift
; AVX512BW: Found an estimated cost of 24 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = ashr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
ret <64 x i8> %shift
}
@@ -527,7 +525,8 @@ define <4 x i64> @splatconstant_shift_v4
; AVX: Found an estimated cost of 8 for instruction: %shift
; AVX2: Found an estimated cost of 4 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
+; XOPAVX2: Found an estimated cost of 4 for instruction: %shift
%shift = ashr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
ret <4 x i64> %shift
}
@@ -539,7 +538,8 @@ define <8 x i64> @splatconstant_shift_v8
; AVX: Found an estimated cost of 16 for instruction: %shift
; AVX2: Found an estimated cost of 8 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
+; XOPAVX2: Found an estimated cost of 8 for instruction: %shift
%shift = ashr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
ret <8 x i64> %shift
}
@@ -563,7 +563,7 @@ define <8 x i32> @splatconstant_shift_v8
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = ashr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
ret <8 x i32> %shift
@@ -576,7 +576,7 @@ define <16 x i32> @splatconstant_shift_v
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = ashr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
ret <16 x i32> %shift
@@ -601,7 +601,7 @@ define <16 x i16> @splatconstant_shift_v
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
ret <16 x i16> %shift
@@ -615,7 +615,7 @@ define <32 x i16> @splatconstant_shift_v
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512F: Found an estimated cost of 2 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
ret <32 x i16> %shift
Modified: llvm/trunk/test/Analysis/CostModel/X86/vshift-lshr-cost.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/vshift-lshr-cost.ll?rev=303010&r1=303009&r2=303010&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/vshift-lshr-cost.ll (original)
+++ llvm/trunk/test/Analysis/CostModel/X86/vshift-lshr-cost.ll Sun May 14 08:38:53 2017
@@ -37,7 +37,7 @@ define <4 x i64> @var_shift_v4i64(<4 x i
; AVX: Found an estimated cost of 8 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = lshr <4 x i64> %a, %b
ret <4 x i64> %shift
@@ -50,7 +50,7 @@ define <8 x i64> @var_shift_v8i64(<8 x i
; AVX: Found an estimated cost of 16 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = lshr <8 x i64> %a, %b
ret <8 x i64> %shift
@@ -76,7 +76,7 @@ define <8 x i32> @var_shift_v8i32(<8 x i
; AVX: Found an estimated cost of 22 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = lshr <8 x i32> %a, %b
ret <8 x i32> %shift
@@ -89,7 +89,7 @@ define <16 x i32> @var_shift_v16i32(<16
; AVX: Found an estimated cost of 44 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = lshr <16 x i32> %a, %b
ret <16 x i32> %shift
@@ -116,7 +116,7 @@ define <16 x i16> @var_shift_v16i16(<16
; AVX2: Found an estimated cost of 10 for instruction: %shift
; AVX512F: Found an estimated cost of 10 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = lshr <16 x i16> %a, %b
ret <16 x i16> %shift
}
@@ -129,7 +129,7 @@ define <32 x i16> @var_shift_v32i16(<32
; AVX2: Found an estimated cost of 20 for instruction: %shift
; AVX512F: Found an estimated cost of 20 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = lshr <32 x i16> %a, %b
ret <32 x i16> %shift
}
@@ -153,7 +153,7 @@ define <32 x i8> @var_shift_v32i8(<32 x
; AVX: Found an estimated cost of 24 for instruction: %shift
; AVX2: Found an estimated cost of 11 for instruction: %shift
; AVX512: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = lshr <32 x i8> %a, %b
ret <32 x i8> %shift
}
@@ -166,7 +166,7 @@ define <64 x i8> @var_shift_v64i8(<64 x
; AVX2: Found an estimated cost of 22 for instruction: %shift
; AVX512F: Found an estimated cost of 22 for instruction: %shift
; AVX512BW: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = lshr <64 x i8> %a, %b
ret <64 x i8> %shift
}
@@ -196,7 +196,7 @@ define <4 x i64> @splatvar_shift_v4i64(<
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%insert = insertelement <4 x i64> undef, i64 %b, i32 0
%splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
@@ -211,7 +211,7 @@ define <8 x i64> @splatvar_shift_v8i64(<
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%insert = insertelement <8 x i64> undef, i64 %b, i32 0
%splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
@@ -240,7 +240,7 @@ define <8 x i32> @splatvar_shift_v8i32(<
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%insert = insertelement <8 x i32> undef, i32 %b, i32 0
%splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
@@ -255,7 +255,7 @@ define <16 x i32> @splatvar_shift_v16i32
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%insert = insertelement <16 x i32> undef, i32 %b, i32 0
%splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
@@ -284,7 +284,7 @@ define <16 x i16> @splatvar_shift_v16i16
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%insert = insertelement <16 x i16> undef, i16 %b, i32 0
%splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
@@ -300,7 +300,7 @@ define <32 x i16> @splatvar_shift_v32i16
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512F: Found an estimated cost of 2 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%insert = insertelement <32 x i16> undef, i16 %b, i32 0
%splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
@@ -329,7 +329,7 @@ define <32 x i8> @splatvar_shift_v32i8(<
; AVX: Found an estimated cost of 24 for instruction: %shift
; AVX2: Found an estimated cost of 11 for instruction: %shift
; AVX512: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%insert = insertelement <32 x i8> undef, i8 %b, i32 0
%splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
%shift = lshr <32 x i8> %a, %splat
@@ -344,7 +344,7 @@ define <64 x i8> @splatvar_shift_v64i8(<
; AVX2: Found an estimated cost of 22 for instruction: %shift
; AVX512F: Found an estimated cost of 22 for instruction: %shift
; AVX512BW: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%insert = insertelement <64 x i8> undef, i8 %b, i32 0
%splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
%shift = lshr <64 x i8> %a, %splat
@@ -375,7 +375,7 @@ define <4 x i64> @constant_shift_v4i64(<
; AVX: Found an estimated cost of 8 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = lshr <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
ret <4 x i64> %shift
@@ -388,7 +388,7 @@ define <8 x i64> @constant_shift_v8i64(<
; AVX: Found an estimated cost of 16 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = lshr <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
ret <8 x i64> %shift
@@ -414,7 +414,7 @@ define <8 x i32> @constant_shift_v8i32(<
; AVX: Found an estimated cost of 22 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = lshr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
ret <8 x i32> %shift
@@ -427,7 +427,7 @@ define <16 x i32> @constant_shift_v16i32
; AVX: Found an estimated cost of 44 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = lshr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
ret <16 x i32> %shift
@@ -454,7 +454,7 @@ define <16 x i16> @constant_shift_v16i16
; AVX2: Found an estimated cost of 10 for instruction: %shift
; AVX512F: Found an estimated cost of 10 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = lshr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <16 x i16> %shift
}
@@ -467,7 +467,7 @@ define <32 x i16> @constant_shift_v32i16
; AVX2: Found an estimated cost of 20 for instruction: %shift
; AVX512F: Found an estimated cost of 20 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = lshr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <32 x i16> %shift
}
@@ -491,7 +491,7 @@ define <32 x i8> @constant_shift_v32i8(<
; AVX: Found an estimated cost of 24 for instruction: %shift
; AVX2: Found an estimated cost of 11 for instruction: %shift
; AVX512: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 6 for instruction: %shift
%shift = lshr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
ret <32 x i8> %shift
}
@@ -504,7 +504,7 @@ define <64 x i8> @constant_shift_v64i8(<
; AVX2: Found an estimated cost of 22 for instruction: %shift
; AVX512F: Found an estimated cost of 22 for instruction: %shift
; AVX512BW: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 8 for instruction: %shift
+; XOP: Found an estimated cost of 12 for instruction: %shift
%shift = lshr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
ret <64 x i8> %shift
}
@@ -532,7 +532,7 @@ define <4 x i64> @splatconstant_shift_v4
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = lshr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
ret <4 x i64> %shift
@@ -545,7 +545,7 @@ define <8 x i64> @splatconstant_shift_v8
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = lshr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
ret <8 x i64> %shift
@@ -570,7 +570,7 @@ define <8 x i32> @splatconstant_shift_v8
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = lshr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
ret <8 x i32> %shift
@@ -583,7 +583,7 @@ define <16 x i32> @splatconstant_shift_v
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = lshr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
ret <16 x i32> %shift
@@ -608,7 +608,7 @@ define <16 x i16> @splatconstant_shift_v
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 6 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = lshr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
ret <16 x i16> %shift
@@ -622,7 +622,7 @@ define <32 x i16> @splatconstant_shift_v
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512F: Found an estimated cost of 2 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 8 for instruction: %shift
+; XOPAVX: Found an estimated cost of 12 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = lshr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
ret <32 x i16> %shift
Modified: llvm/trunk/test/Analysis/CostModel/X86/vshift-shl-cost.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/vshift-shl-cost.ll?rev=303010&r1=303009&r2=303010&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/vshift-shl-cost.ll (original)
+++ llvm/trunk/test/Analysis/CostModel/X86/vshift-shl-cost.ll Sun May 14 08:38:53 2017
@@ -38,7 +38,7 @@ define <4 x i64> @var_shift_v4i64(<4 x i
; AVX: Found an estimated cost of 8 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = shl <4 x i64> %a, %b
ret <4 x i64> %shift
@@ -51,7 +51,7 @@ define <8 x i64> @var_shift_v8i64(<8 x i
; AVX: Found an estimated cost of 16 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = shl <8 x i64> %a, %b
ret <8 x i64> %shift
@@ -77,7 +77,7 @@ define <8 x i32> @var_shift_v8i32(<8 x i
; AVX: Found an estimated cost of 8 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = shl <8 x i32> %a, %b
ret <8 x i32> %shift
@@ -90,7 +90,7 @@ define <16 x i32> @var_shift_v16i32(<16
; AVX: Found an estimated cost of 16 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = shl <16 x i32> %a, %b
ret <16 x i32> %shift
@@ -117,7 +117,7 @@ define <16 x i16> @var_shift_v16i16(<16
; AVX2: Found an estimated cost of 10 for instruction: %shift
; AVX512F: Found an estimated cost of 10 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 2 for instruction: %shift
+; XOP: Found an estimated cost of 4 for instruction: %shift
%shift = shl <16 x i16> %a, %b
ret <16 x i16> %shift
}
@@ -130,7 +130,7 @@ define <32 x i16> @var_shift_v32i16(<32
; AVX2: Found an estimated cost of 20 for instruction: %shift
; AVX512F: Found an estimated cost of 20 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 8 for instruction: %shift
%shift = shl <32 x i16> %a, %b
ret <32 x i16> %shift
}
@@ -154,7 +154,7 @@ define <32 x i8> @var_shift_v32i8(<32 x
; AVX: Found an estimated cost of 22 for instruction: %shift
; AVX2: Found an estimated cost of 11 for instruction: %shift
; AVX512: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 2 for instruction: %shift
+; XOP: Found an estimated cost of 4 for instruction: %shift
%shift = shl <32 x i8> %a, %b
ret <32 x i8> %shift
}
@@ -167,7 +167,7 @@ define <64 x i8> @var_shift_v64i8(<64 x
; AVX2: Found an estimated cost of 22 for instruction: %shift
; AVX512F: Found an estimated cost of 22 for instruction: %shift
; AVX512BW: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 8 for instruction: %shift
%shift = shl <64 x i8> %a, %b
ret <64 x i8> %shift
}
@@ -197,7 +197,7 @@ define <4 x i64> @splatvar_shift_v4i64(<
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%insert = insertelement <4 x i64> undef, i64 %b, i32 0
%splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
@@ -212,7 +212,7 @@ define <8 x i64> @splatvar_shift_v8i64(<
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%insert = insertelement <8 x i64> undef, i64 %b, i32 0
%splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
@@ -241,7 +241,7 @@ define <8 x i32> @splatvar_shift_v8i32(<
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%insert = insertelement <8 x i32> undef, i32 %b, i32 0
%splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
@@ -256,7 +256,7 @@ define <16 x i32> @splatvar_shift_v16i32
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%insert = insertelement <16 x i32> undef, i32 %b, i32 0
%splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
@@ -285,7 +285,7 @@ define <16 x i16> @splatvar_shift_v16i16
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%insert = insertelement <16 x i16> undef, i16 %b, i32 0
%splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
@@ -301,7 +301,7 @@ define <32 x i16> @splatvar_shift_v32i16
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512F: Found an estimated cost of 2 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%insert = insertelement <32 x i16> undef, i16 %b, i32 0
%splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
@@ -330,7 +330,7 @@ define <32 x i8> @splatvar_shift_v32i8(<
; AVX: Found an estimated cost of 22 for instruction: %shift
; AVX2: Found an estimated cost of 11 for instruction: %shift
; AVX512: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 2 for instruction: %shift
+; XOP: Found an estimated cost of 4 for instruction: %shift
%insert = insertelement <32 x i8> undef, i8 %b, i32 0
%splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
%shift = shl <32 x i8> %a, %splat
@@ -345,7 +345,7 @@ define <64 x i8> @splatvar_shift_v64i8(<
; AVX2: Found an estimated cost of 22 for instruction: %shift
; AVX512F: Found an estimated cost of 22 for instruction: %shift
; AVX512BW: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 8 for instruction: %shift
%insert = insertelement <64 x i8> undef, i8 %b, i32 0
%splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
%shift = shl <64 x i8> %a, %splat
@@ -376,7 +376,7 @@ define <4 x i64> @constant_shift_v4i64(<
; AVX: Found an estimated cost of 8 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = shl <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
ret <4 x i64> %shift
@@ -389,7 +389,7 @@ define <8 x i64> @constant_shift_v8i64(<
; AVX: Found an estimated cost of 16 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = shl <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
ret <8 x i64> %shift
@@ -415,7 +415,7 @@ define <8 x i32> @constant_shift_v8i32(<
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = shl <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
ret <8 x i32> %shift
@@ -428,7 +428,7 @@ define <16 x i32> @constant_shift_v16i32
; AVX: Found an estimated cost of 8 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = shl <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
ret <16 x i32> %shift
@@ -453,7 +453,7 @@ define <16 x i16> @constant_shift_v16i16
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = shl <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <16 x i16> %shift
@@ -467,7 +467,7 @@ define <32 x i16> @constant_shift_v32i16
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512F: Found an estimated cost of 2 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = shl <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
ret <32 x i16> %shift
@@ -492,7 +492,7 @@ define <32 x i8> @constant_shift_v32i8(<
; AVX: Found an estimated cost of 22 for instruction: %shift
; AVX2: Found an estimated cost of 11 for instruction: %shift
; AVX512: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 2 for instruction: %shift
+; XOP: Found an estimated cost of 4 for instruction: %shift
%shift = shl <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
ret <32 x i8> %shift
}
@@ -505,7 +505,7 @@ define <64 x i8> @constant_shift_v64i8(<
; AVX2: Found an estimated cost of 22 for instruction: %shift
; AVX512F: Found an estimated cost of 22 for instruction: %shift
; AVX512BW: Found an estimated cost of 11 for instruction: %shift
-; XOP: Found an estimated cost of 4 for instruction: %shift
+; XOP: Found an estimated cost of 8 for instruction: %shift
%shift = shl <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
ret <64 x i8> %shift
}
@@ -534,7 +534,7 @@ define <4 x i64> @splatconstant_shift_v4
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = shl <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
ret <4 x i64> %shift
@@ -547,7 +547,7 @@ define <8 x i64> @splatconstant_shift_v8
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = shl <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
ret <8 x i64> %shift
@@ -573,7 +573,7 @@ define <8 x i32> @splatconstant_shift_v8
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = shl <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
ret <8 x i32> %shift
@@ -586,7 +586,7 @@ define <16 x i32> @splatconstant_shift_v
; AVX: Found an estimated cost of 4 for instruction: %shift
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = shl <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
ret <16 x i32> %shift
@@ -611,7 +611,7 @@ define <16 x i16> @splatconstant_shift_v
; AVX: Found an estimated cost of 2 for instruction: %shift
; AVX2: Found an estimated cost of 1 for instruction: %shift
; AVX512: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 2 for instruction: %shift
+; XOPAVX: Found an estimated cost of 4 for instruction: %shift
; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
%shift = shl <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
ret <16 x i16> %shift
@@ -625,7 +625,7 @@ define <32 x i16> @splatconstant_shift_v
; AVX2: Found an estimated cost of 2 for instruction: %shift
; AVX512F: Found an estimated cost of 2 for instruction: %shift
; AVX512BW: Found an estimated cost of 1 for instruction: %shift
-; XOPAVX: Found an estimated cost of 4 for instruction: %shift
+; XOPAVX: Found an estimated cost of 8 for instruction: %shift
; XOPAVX2: Found an estimated cost of 2 for instruction: %shift
%shift = shl <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
ret <32 x i16> %shift
@@ -761,7 +761,7 @@ define <16 x i16> @test6(<16 x i16> %a)
; SSE41: Found an estimated cost of 2 for instruction: %shl
; AVX: Found an estimated cost of 4 for instruction: %shl
; AVX2: Found an estimated cost of 1 for instruction: %shl
-; XOPAVX: Found an estimated cost of 2 for instruction: %shl
+; XOPAVX: Found an estimated cost of 4 for instruction: %shl
; XOPAVX2: Found an estimated cost of 1 for instruction: %shl
@@ -778,7 +778,7 @@ define <8 x i32> @test7(<8 x i32> %a) {
; SSE41: Found an estimated cost of 2 for instruction: %shl
; AVX: Found an estimated cost of 4 for instruction: %shl
; AVX2: Found an estimated cost of 1 for instruction: %shl
-; XOPAVX: Found an estimated cost of 2 for instruction: %shl
+; XOPAVX: Found an estimated cost of 4 for instruction: %shl
; XOPAVX2: Found an estimated cost of 1 for instruction: %shl
@@ -796,7 +796,7 @@ define <4 x i64> @test8(<4 x i64> %a) {
; SSE41: Found an estimated cost of 8 for instruction: %shl
; AVX: Found an estimated cost of 8 for instruction: %shl
; AVX2: Found an estimated cost of 1 for instruction: %shl
-; XOPAVX: Found an estimated cost of 2 for instruction: %shl
+; XOPAVX: Found an estimated cost of 4 for instruction: %shl
; XOPAVX2: Found an estimated cost of 1 for instruction: %shl
@@ -811,7 +811,7 @@ define <32 x i16> @test9(<32 x i16> %a)
; SSE41: Found an estimated cost of 4 for instruction: %shl
; AVX: Found an estimated cost of 8 for instruction: %shl
; AVX2: Found an estimated cost of 2 for instruction: %shl
-; XOPAVX: Found an estimated cost of 4 for instruction: %shl
+; XOPAVX: Found an estimated cost of 8 for instruction: %shl
; XOPAVX2: Found an estimated cost of 2 for instruction: %shl
@@ -826,7 +826,7 @@ define <16 x i32> @test10(<16 x i32> %a)
; SSE41: Found an estimated cost of 4 for instruction: %shl
; AVX: Found an estimated cost of 8 for instruction: %shl
; AVX2: Found an estimated cost of 2 for instruction: %shl
-; XOPAVX: Found an estimated cost of 4 for instruction: %shl
+; XOPAVX: Found an estimated cost of 8 for instruction: %shl
; XOPAVX2: Found an estimated cost of 2 for instruction: %shl
@@ -844,5 +844,5 @@ define <8 x i64> @test11(<8 x i64> %a) {
; SSE41: Found an estimated cost of 16 for instruction: %shl
; AVX: Found an estimated cost of 16 for instruction: %shl
; AVX2: Found an estimated cost of 2 for instruction: %shl
-; XOPAVX: Found an estimated cost of 4 for instruction: %shl
+; XOPAVX: Found an estimated cost of 8 for instruction: %shl
; XOPAVX2: Found an estimated cost of 2 for instruction: %shl
More information about the llvm-commits
mailing list