diff --git a/src/coreclr/src/jit/hwintrinsic.h b/src/coreclr/src/jit/hwintrinsic.h index fc3686fbe403e6..b3c00f45d98097 100644 --- a/src/coreclr/src/jit/hwintrinsic.h +++ b/src/coreclr/src/jit/hwintrinsic.h @@ -328,6 +328,11 @@ struct HWIntrinsicInfo return static_cast(FloatComparisonMode::OrderedGreaterThanSignaling); } + // CompareGreaterThan is not directly supported in hardware without AVX support. + // We will return the inverted case here and lowering will itself swap the ops + // to ensure the emitted code remains correct. This simplifies the overall logic + // here and for other use cases. + assert(id != NI_AVX_CompareGreaterThan); return static_cast(FloatComparisonMode::OrderedLessThanSignaling); } @@ -352,6 +357,11 @@ struct HWIntrinsicInfo return static_cast(FloatComparisonMode::OrderedGreaterThanOrEqualSignaling); } + // CompareGreaterThanOrEqual is not directly supported in hardware without AVX support. + // We will return the inverted case here and lowering will itself swap the ops + // to ensure the emitted code remains correct. This simplifies the overall logic + // here and for other use cases. + assert(id != NI_AVX_CompareGreaterThanOrEqual); return static_cast(FloatComparisonMode::OrderedLessThanOrEqualSignaling); } @@ -385,6 +395,11 @@ struct HWIntrinsicInfo return static_cast(FloatComparisonMode::UnorderedNotGreaterThanSignaling); } + // CompareNotGreaterThan is not directly supported in hardware without AVX support. + // We will return the inverted case here and lowering will itself swap the ops + // to ensure the emitted code remains correct. This simplifies the overall logic + // here and for other use cases. + assert(id != NI_AVX_CompareNotGreaterThan); return static_cast(FloatComparisonMode::UnorderedNotLessThanSignaling); } @@ -409,6 +424,11 @@ struct HWIntrinsicInfo return static_cast(FloatComparisonMode::UnorderedNotGreaterThanOrEqualSignaling); } + // CompareNotGreaterThanOrEqual is not directly supported in hardware without AVX support. + // We will return the inverted case here and lowering will itself swap the ops + // to ensure the emitted code remains correct. This simplifies the overall logic + // here and for other use cases. + assert(id != NI_AVX_CompareNotGreaterThanOrEqual); return static_cast(FloatComparisonMode::UnorderedNotLessThanOrEqualSignaling); }