diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/OperatorExpressionGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/OperatorExpressionGenerator.kt index 32175048257..63a739bf253 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/OperatorExpressionGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/OperatorExpressionGenerator.kt @@ -388,9 +388,6 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat operandType == targetType || operandNNType == targetType -> this - targetType.isInt() && (operandNNType.isShort() || operandNNType.isByte()) -> - this - // TODO: don't rely on originalKotlinType. type.originalKotlinType!!.containsNull() -> safeCallOnDispatchReceiver(this@OperatorExpressionGenerator, startOffset, endOffset) { dispatchReceiver -> diff --git a/compiler/testData/codegen/bytecodeText/conditions/noBoxingForBoxedEqPrimitive.kt b/compiler/testData/codegen/bytecodeText/conditions/noBoxingForBoxedEqPrimitive.kt index d20f0230e33..da8f2b0f78c 100644 --- a/compiler/testData/codegen/bytecodeText/conditions/noBoxingForBoxedEqPrimitive.kt +++ b/compiler/testData/codegen/bytecodeText/conditions/noBoxingForBoxedEqPrimitive.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + fun testBoolean1(a: Boolean?, b: Boolean) = a == b fun testBoolean2(a: Boolean?, b: Boolean) = a != b diff --git a/compiler/testData/codegen/bytecodeText/conditions/noBoxingForPrimitiveEqBoxed.kt b/compiler/testData/codegen/bytecodeText/conditions/noBoxingForPrimitiveEqBoxed.kt index 7fb29c4428c..02f4a299e82 100644 --- a/compiler/testData/codegen/bytecodeText/conditions/noBoxingForPrimitiveEqBoxed.kt +++ b/compiler/testData/codegen/bytecodeText/conditions/noBoxingForPrimitiveEqBoxed.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + fun testBoolean1(a: Boolean, b: Boolean?) = a == b fun testBoolean2(a: Boolean, b: Boolean?) = a != b diff --git a/compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast_after.kt b/compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast_after.kt index c3a6db9113c..4bc41a6475b 100644 --- a/compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast_after.kt +++ b/compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast_after.kt @@ -1,4 +1,6 @@ // !LANGUAGE: +ProperIeee754Comparisons +// IGNORE_BACKEND: JVM_IR + fun equals3(a: Byte?, b: Byte?) = a != null && b != null && a == b fun equals4(a: Byte?, b: Byte?) = if (a is Byte && b is Byte) a == b else null!! diff --git a/compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast_before.kt b/compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast_before.kt index 0564f0b291f..4feed9d39f5 100644 --- a/compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast_before.kt +++ b/compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast_before.kt @@ -1,4 +1,6 @@ // !LANGUAGE: -ProperIeee754Comparisons +// IGNORE_BACKEND: JVM_IR + fun equals3(a: Byte?, b: Byte?) = a != null && b != null && a == b fun equals4(a: Byte?, b: Byte?) = if (a is Byte && b is Byte) a == b else null!! diff --git a/compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast_after.kt b/compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast_after.kt index 066fa95f060..fb537f3d29b 100644 --- a/compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast_after.kt +++ b/compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast_after.kt @@ -1,4 +1,6 @@ // !LANGUAGE: +ProperIeee754Comparisons +// IGNORE_BACKEND: JVM_IR + fun equals3(a: Short?, b: Short?) = a != null && b != null && a == b fun equals4(a: Short?, b: Short?) = if (a is Short && b is Short) a == b else null!! diff --git a/compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast_before.kt b/compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast_before.kt index 6b35e7f91c8..d9bdf38b980 100644 --- a/compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast_before.kt +++ b/compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast_before.kt @@ -1,4 +1,6 @@ // !LANGUAGE: -ProperIeee754Comparisons +// IGNORE_BACKEND: JVM_IR + fun equals3(a: Short?, b: Short?) = a != null && b != null && a == b fun equals4(a: Short?, b: Short?) = if (a is Short && b is Short) a == b else null!!