AVX fixes: add missing 8/16-bit gathers and scatters, set features string appropriately when AVX is enabled.
This commit is contained in:
12
module.cpp
12
module.cpp
@@ -949,10 +949,12 @@ Module::writeObjectFileOrAssembly(OutputType outputType, const char *outFileName
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string featuresString;
|
std::string featuresString;
|
||||||
|
llvm::TargetMachine *targetMachine = NULL;
|
||||||
#if defined LLVM_3_0svn || defined LLVM_3_0
|
#if defined LLVM_3_0svn || defined LLVM_3_0
|
||||||
llvm::TargetMachine *targetMachine =
|
if (g->target.isa == Target::AVX)
|
||||||
target->createTargetMachine(triple.getTriple(), g->target.cpu,
|
featuresString = "+avx";
|
||||||
featuresString);
|
targetMachine = target->createTargetMachine(triple.getTriple(), g->target.cpu,
|
||||||
|
featuresString);
|
||||||
#else
|
#else
|
||||||
if (g->target.cpu.size()) {
|
if (g->target.cpu.size()) {
|
||||||
llvm::SubtargetFeatures features;
|
llvm::SubtargetFeatures features;
|
||||||
@@ -960,8 +962,8 @@ Module::writeObjectFileOrAssembly(OutputType outputType, const char *outFileName
|
|||||||
featuresString = features.getString();
|
featuresString = features.getString();
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::TargetMachine *targetMachine =
|
targetMachine = target->createTargetMachine(triple.getTriple(),
|
||||||
target->createTargetMachine(triple.getTriple(), featuresString);
|
featuresString);
|
||||||
#endif
|
#endif
|
||||||
if (targetMachine == NULL) {
|
if (targetMachine == NULL) {
|
||||||
fprintf(stderr, "Unable to create target machine for target \"%s\"!",
|
fprintf(stderr, "Unable to create target machine for target \"%s\"!",
|
||||||
|
|||||||
@@ -698,12 +698,16 @@ define void @__masked_store_blend_64(<8 x i64>* nocapture %ptr, <8 x i64> %new,
|
|||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; gather/scatter
|
;; gather/scatter
|
||||||
|
|
||||||
|
gen_gather(8, i8)
|
||||||
|
gen_gather(8, i16)
|
||||||
gen_gather(8, i32)
|
gen_gather(8, i32)
|
||||||
gen_gather(8, i64)
|
gen_gather(8, i64)
|
||||||
|
|
||||||
|
gen_scatter(8, i8)
|
||||||
|
gen_scatter(8, i16)
|
||||||
gen_scatter(8, i32)
|
gen_scatter(8, i32)
|
||||||
gen_scatter(8, i64)
|
gen_scatter(8, i64)
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; double precision sqrt
|
;; double precision sqrt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user