1 /* |
1 /* |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
502 "String compare is only known 'load' that does not conflict with any stores"); |
502 "String compare is only known 'load' that does not conflict with any stores"); |
503 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_StrEquals), |
503 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_StrEquals), |
504 "String equals is a 'load' that does not conflict with any stores"); |
504 "String equals is a 'load' that does not conflict with any stores"); |
505 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_StrIndexOf), |
505 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_StrIndexOf), |
506 "String indexOf is a 'load' that does not conflict with any stores"); |
506 "String indexOf is a 'load' that does not conflict with any stores"); |
|
507 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_StrIndexOfChar), |
|
508 "String indexOfChar is a 'load' that does not conflict with any stores"); |
507 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_AryEq), |
509 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_AryEq), |
508 "Arrays equals is a 'load' that do not conflict with any stores"); |
510 "Arrays equals is a 'load' that does not conflict with any stores"); |
|
511 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_HasNegatives), |
|
512 "HasNegatives is a 'load' that does not conflict with any stores"); |
509 |
513 |
510 if (!C->alias_type(load_alias_idx)->is_rewritable()) { |
514 if (!C->alias_type(load_alias_idx)->is_rewritable()) { |
511 // It is impossible to spoil this load by putting stores before it, |
515 // It is impossible to spoil this load by putting stores before it, |
512 // because we know that the stores will never update the value |
516 // because we know that the stores will never update the value |
513 // which 'load' must witness. |
517 // which 'load' must witness. |