Skip to content

Commit 7bf15a4

Browse files
committed
[GR-70260] Fix AVX512 code generation path for scalar integer min/max
PullRequest: graal/22293
2 parents 7ad8b89 + 785f832 commit 7bf15a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/vector/lir/amd64/AMD64AVX512ArithmeticLIRGenerator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,9 @@ protected AllocatableValue emitVectorFloatCompare(AllocatableValue a, Allocatabl
13861386
@Override
13871387
protected Value emitIntegerMinMax(LIRKind cmpKind, Value a, Value b, AMD64MathMinMaxFloatOp minmaxop, NumUtil.Signedness signedness) {
13881388
AMD64Kind kind = (AMD64Kind) a.getPlatformKind();
1389-
GraalError.guarantee(kind.getVectorLength() > 1, "scalar integer min/max not supported");
1389+
if (kind.getVectorLength() == 1) {
1390+
return super.emitIntegerMinMax(cmpKind, a, b, minmaxop, signedness);
1391+
}
13901392
GraalError.guarantee(kind.getScalar().isInteger(), "expected integer vector for integer min/max");
13911393
LIRKind resultKind = LIRKind.combine(a, b);
13921394
boolean min = (minmaxop == AMD64MathMinMaxFloatOp.Min);

0 commit comments

Comments
 (0)