Skip to content

Commit

Permalink
Revert "Remove support for building with LLVM 3.1"
Browse files Browse the repository at this point in the history
This reverts commit d3c5675.

Conflicts:
	opt.cpp
  • Loading branch information
Matt Pharr committed Aug 7, 2013
1 parent ccdbddd commit 1276ea9
Show file tree
Hide file tree
Showing 21 changed files with 320 additions and 84 deletions.
2 changes: 2 additions & 0 deletions builtins.cpp
Expand Up @@ -49,6 +49,8 @@
#include <stdlib.h>
#if defined(LLVM_3_2)
#include <llvm/Attributes.h>
#endif
#if defined(LLVM_3_1) || defined(LLVM_3_2)
#include <llvm/LLVMContext.h>
#include <llvm/Module.h>
#include <llvm/Type.h>
Expand Down
4 changes: 3 additions & 1 deletion builtins/target-avx11-x2.ll
Expand Up @@ -31,7 +31,9 @@

include(`target-avx-x2.ll')

rdrand_definition()
ifelse(LLVM_VERSION, `LLVM_3_0', `rdrand_decls()',
LLVM_VERSION, `LLVM_3_1', `rdrand_decls()',
`rdrand_definition()')

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; int min/max
Expand Down
4 changes: 3 additions & 1 deletion builtins/target-avx11.ll
Expand Up @@ -31,7 +31,9 @@

include(`target-avx.ll')

rdrand_definition()
ifelse(LLVM_VERSION, `LLVM_3_0', `rdrand_decls()',
LLVM_VERSION, `LLVM_3_1', `rdrand_decls()',
`rdrand_definition()')

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; int min/max
Expand Down
25 changes: 23 additions & 2 deletions builtins/target-avx2-x2.ll
Expand Up @@ -29,11 +29,15 @@
;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

define(`HAVE_GATHER', `1')
ifelse(LLVM_VERSION, `LLVM_3_0', `',
LLVM_VERSION, `LLVM_3_1', `',
`define(`HAVE_GATHER', `1')')

include(`target-avx-x2.ll')

rdrand_definition()
ifelse(LLVM_VERSION, `LLVM_3_0', `rdrand_decls()',
LLVM_VERSION, `LLVM_3_1', `rdrand_decls()',
`rdrand_definition()')

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; int min/max
Expand Down Expand Up @@ -172,6 +176,21 @@ define(`assemble_4s', `
assemble_8s($1, $2, $2_1, $2_2)
')

ifelse(LLVM_VERSION, `LLVM_3_0', `
gen_gather_factored(i8)
gen_gather_factored(i16)
gen_gather_factored(i32)
gen_gather_factored(float)
gen_gather_factored(i64)
gen_gather_factored(double)',
LLVM_VERSION, `LLVM_3_1', `
gen_gather_factored(i8)
gen_gather_factored(i16)
gen_gather_factored(i32)
gen_gather_factored(float)
gen_gather_factored(i64)
gen_gather_factored(double)', `

gen_gather(i8)
gen_gather(i16)

Expand Down Expand Up @@ -538,3 +557,5 @@ define <16 x double> @__gather64_double(<16 x i64> %ptrs,

ret <16 x double> %v
}

')
25 changes: 23 additions & 2 deletions builtins/target-avx2.ll
Expand Up @@ -29,11 +29,15 @@
;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

define(`HAVE_GATHER', `1')
ifelse(LLVM_VERSION, `LLVM_3_0', `',
LLVM_VERSION, `LLVM_3_1', `',
`define(`HAVE_GATHER', `1')')

include(`target-avx.ll')

rdrand_definition()
ifelse(LLVM_VERSION, `LLVM_3_0', `rdrand_decls()',
LLVM_VERSION, `LLVM_3_1', `rdrand_decls()',
`rdrand_definition()')

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; int min/max
Expand Down Expand Up @@ -119,6 +123,21 @@ define(`extract_4s', `
%$2_2 = shufflevector <8 x $1> %$2, <8 x $1> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
')

ifelse(LLVM_VERSION, `LLVM_3_0', `
gen_gather_factored(i8)
gen_gather_factored(i16)
gen_gather_factored(i32)
gen_gather_factored(float)
gen_gather_factored(i64)
gen_gather_factored(double)',
LLVM_VERSION, `LLVM_3_1', `
gen_gather_factored(i8)
gen_gather_factored(i16)
gen_gather_factored(i32)
gen_gather_factored(float)
gen_gather_factored(i64)
gen_gather_factored(double)', `

gen_gather(i8)
gen_gather(i16)

Expand Down Expand Up @@ -410,3 +429,5 @@ define <8 x double> @__gather64_double(<8 x i64> %ptrs,

ret <8 x double> %v
}

')

0 comments on commit 1276ea9

Please sign in to comment.