-Adding support for LLVM 4.0

-Switching 3.9 support to branch/release_39
-Switching 3.8 support to tags/release_381
This commit is contained in:
Dmitry Babokin
2016-07-20 22:16:50 +03:00
parent 2a68fc6c48
commit 45b306480e
9 changed files with 42 additions and 10 deletions

View File

@@ -151,6 +151,8 @@ define(`PTR_OP_ARGS',
LLVM_VERSION, LLVM_3_8,
``$1 , $1 *'',
LLVM_VERSION, LLVM_3_9,
``$1 , $1 *'',
LLVM_VERSION, LLVM_4_0,
``$1 , $1 *'',
``$1 *''
)

View File

@@ -36,6 +36,8 @@ ifelse(LLVM_VERSION, LLVM_3_7,
LLVM_VERSION, LLVM_3_8,
`include(`target-avx512-common.ll')',
LLVM_VERSION, LLVM_3_9,
`include(`target-avx512-common.ll')',
LLVM_VERSION, LLVM_4_0,
`include(`target-avx512-common.ll')'
)
@@ -60,6 +62,8 @@ ifelse(LLVM_VERSION, LLVM_3_7,
LLVM_VERSION, LLVM_3_8,
rcp_rsqrt_varying_float_knl(),
LLVM_VERSION, LLVM_3_9,
rcp_rsqrt_varying_float_knl(),
LLVM_VERSION, LLVM_4_0,
rcp_rsqrt_varying_float_knl()
)

View File

@@ -35,6 +35,8 @@ define(`WIDTH',`16')
ifelse(LLVM_VERSION, LLVM_3_8,
`include(`target-avx512-common.ll')',
LLVM_VERSION, LLVM_3_9,
`include(`target-avx512-common.ll')',
LLVM_VERSION, LLVM_4_0,
`include(`target-avx512-common.ll')'
)
@@ -80,6 +82,8 @@ define <16 x float> @__rsqrt_varying_float(<16 x float> %v) nounwind readonly al
ifelse(LLVM_VERSION, LLVM_3_8,
rcp_rsqrt_varying_float_skx(),
LLVM_VERSION, LLVM_3_9,
rcp_rsqrt_varying_float_skx(),
LLVM_VERSION, LLVM_4_0,
rcp_rsqrt_varying_float_skx()
)

View File

@@ -54,9 +54,11 @@ define(`MASK_HIGH_BIT_ON',
define(`PTR_OP_ARGS',
ifelse(LLVM_VERSION, LLVM_3_7,
``$1 , $1 *'',
ifelse(LLVM_VERSION, LLVM_3_8,
LLVM_VERSION, LLVM_3_8,
``$1 , $1 *'',
ifelse(LLVM_VERSION, LLVM_3_9,
LLVM_VERSION, LLVM_3_9,
``$1 , $1 *'',
LLVM_VERSION, LLVM_4_0,
``$1 , $1 *'',
``$1 *''
)

View File

@@ -57,6 +57,8 @@ define(`PTR_OP_ARGS',
LLVM_VERSION, LLVM_3_8,
``$1 , $1 *'',
LLVM_VERSION, LLVM_3_9,
``$1 , $1 *'',
LLVM_VERSION, LLVM_4_0,
``$1 , $1 *'',
``$1 *''
)
@@ -69,6 +71,8 @@ define(`MdORi64',
``i64'',
LLVM_VERSION, LLVM_3_9,
``i64'',
LLVM_VERSION, LLVM_4_0,
``i64'',
``double''
)
)
@@ -78,6 +82,8 @@ define(`MfORi32',
``i32'',
LLVM_VERSION, LLVM_3_9,
``i32'',
LLVM_VERSION, LLVM_4_0,
``i32'',
``float''
)
)
@@ -1586,6 +1592,9 @@ define <$1 x $2> @__atomic_compare_exchange_$3_global($2* %ptr, <$1 x $2> %cmp,
',LLVM_VERSION,LLVM_3_9,`
%r_LANE_ID_t = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst seq_cst
%r_LANE_ID = extractvalue { $2, i1 } %r_LANE_ID_t, 0
',LLVM_VERSION,LLVM_4_0,`
%r_LANE_ID_t = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst seq_cst
%r_LANE_ID = extractvalue { $2, i1 } %r_LANE_ID_t, 0
',`
%r_LANE_ID = cmpxchg $2 * %ptr, $2 %cmp_LANE_ID, $2 %val_LANE_ID seq_cst
')
@@ -1614,6 +1623,9 @@ define $2 @__atomic_compare_exchange_uniform_$3_global($2* %ptr, $2 %cmp,
',LLVM_VERSION,LLVM_3_9,`
%r_t = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst seq_cst
%r = extractvalue { $2, i1 } %r_t, 0
',LLVM_VERSION,LLVM_4_0,`
%r_t = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst seq_cst
%r = extractvalue { $2, i1 } %r_t, 0
',`
%r = cmpxchg $2 * %ptr, $2 %cmp, $2 %val seq_cst
')