Stop factoring out constant offsets for gather/scatter if instr is available.
For KNC (gather/scatter), it's not helpful to factor base+offsets gathers
and scatters into base_ptr + {1/2/4/8} * varying_offsets + const_offsets.
Now, if a HW instruction is available for gather/scatter, we just factor
into base + {1/2/4/8} * offsets (if possible). Not only is this simpler,
but it's also what we need to pass a value along to the scale by
2/4/8 available directly in those instructions.
Finishes issue #325.
This commit is contained in:
5
ispc.cpp
5
ispc.cpp
@@ -254,6 +254,7 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
|
||||
t->maskBitCount = 1;
|
||||
t->hasHalf = true;
|
||||
t->hasTranscendentals = true;
|
||||
t->hasGather = t->hasScatter = true;
|
||||
}
|
||||
else if (!strcasecmp(isa, "generic-8")) {
|
||||
t->isa = Target::GENERIC;
|
||||
@@ -263,6 +264,7 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
|
||||
t->maskBitCount = 1;
|
||||
t->hasHalf = true;
|
||||
t->hasTranscendentals = true;
|
||||
t->hasGather = t->hasScatter = true;
|
||||
}
|
||||
else if (!strcasecmp(isa, "generic-16")) {
|
||||
t->isa = Target::GENERIC;
|
||||
@@ -272,6 +274,7 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
|
||||
t->maskBitCount = 1;
|
||||
t->hasHalf = true;
|
||||
t->hasTranscendentals = true;
|
||||
t->hasGather = t->hasScatter = true;
|
||||
}
|
||||
else if (!strcasecmp(isa, "generic-32")) {
|
||||
t->isa = Target::GENERIC;
|
||||
@@ -281,6 +284,7 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
|
||||
t->maskBitCount = 1;
|
||||
t->hasHalf = true;
|
||||
t->hasTranscendentals = true;
|
||||
t->hasGather = t->hasScatter = true;
|
||||
}
|
||||
else if (!strcasecmp(isa, "generic-64")) {
|
||||
t->isa = Target::GENERIC;
|
||||
@@ -290,6 +294,7 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
|
||||
t->maskBitCount = 1;
|
||||
t->hasHalf = true;
|
||||
t->hasTranscendentals = true;
|
||||
t->hasGather = t->hasScatter = true;
|
||||
}
|
||||
else if (!strcasecmp(isa, "generic-1")) {
|
||||
t->isa = Target::GENERIC;
|
||||
|
||||
Reference in New Issue
Block a user