Add dependency for operations with x86 FPU stack
Load Hoisting optimization can re-order operations with
FPU stack due to no dependency set.
Patch adds resource dependency between these operations.
Change-Id: Iccce98c8f3c565903667c03803884d9de1281ea8
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
diff --git a/test/302-float-conversion/src/Main.java b/test/302-float-conversion/src/Main.java
index dc512c5..afc5e97 100644
--- a/test/302-float-conversion/src/Main.java
+++ b/test/302-float-conversion/src/Main.java
@@ -19,6 +19,11 @@
static volatile double negInfinity = Double.NEGATIVE_INFINITY;
public static void main(String args[]) {
+ test1();
+ test2();
+ }
+
+ public static void test1() {
long sumInf = 0;
long sumRes = 0;
@@ -35,9 +40,19 @@
}
if (sumRes == NUM_ITERATIONS / 2) {
- System.out.println("Result is as expected");
+ System.out.println("Iteration Result is as expected");
} else {
System.out.println("Conversions failed over " + NUM_ITERATIONS + " iterations");
}
}
+
+ public static void test2() {
+ long a = 1L;
+ long b = 2L;
+
+ float inter3 = a;
+ float inter4 = b;
+ System.out.println("inter4:" + inter4);
+ }
+
}