--- a/src/hotspot/share/c1/c1_GraphBuilder.cpp Tue Apr 24 12:20:10 2018 -0700
+++ b/src/hotspot/share/c1/c1_GraphBuilder.cpp Tue Apr 24 15:07:20 2018 -0700
@@ -1324,7 +1324,7 @@
void GraphBuilder::table_switch() {
Bytecode_tableswitch sw(stream());
const int l = sw.length();
- if (CanonicalizeNodes && l == 1) {
+ if (CanonicalizeNodes && l == 1 && compilation()->env()->comp_level() != CompLevel_full_profile) {
// total of 2 successors => use If instead of switch
// Note: This code should go into the canonicalizer as soon as it can
// can handle canonicalized forms that contain more than one node.
@@ -1368,7 +1368,7 @@
void GraphBuilder::lookup_switch() {
Bytecode_lookupswitch sw(stream());
const int l = sw.number_of_pairs();
- if (CanonicalizeNodes && l == 1) {
+ if (CanonicalizeNodes && l == 1 && compilation()->env()->comp_level() != CompLevel_full_profile) {
// total of 2 successors => use If instead of switch
// Note: This code should go into the canonicalizer as soon as it can
// can handle canonicalized forms that contain more than one node.