RFR (XS): Use actual byte value instead of (int)true in C1 matrix barrier

Aleksey Shipilev shade at redhat.com
Mon Mar 13 19:12:50 UTC 2017


Found one left-over from bool->char switch:

$ hg diff
diff -r cba65b85b10c src/share/vm/c1/c1_LIRGenerator.cpp
--- a/src/share/vm/c1/c1_LIRGenerator.cpp	Mon Mar 13 13:14:37 2017 +0100
+++ b/src/share/vm/c1/c1_LIRGenerator.cpp	Mon Mar 13 20:10:30 2017 +0100
@@ -1688,7 +1688,7 @@
   __ move(matrix_elem_addr, tmp5);
   __ cmp(lir_cond_notEqual, tmp5, LIR_OprFact::intConst(0));
   __ branch(lir_cond_notEqual, T_BYTE, L_done->label());
-  __ move(LIR_OprFact::intConst((int) true), matrix_elem_addr);
+  __ move(LIR_OprFact::intConst(1), matrix_elem_addr);
   __ branch_destination(L_done->label());
 }

Current code should be safe under C++ rules, but better to be safe.

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list