1.1 --- a/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Tue Mar 29 23:01:10 2016 +0100 1.2 +++ b/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp Tue Apr 05 08:55:39 2016 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -283,7 +283,7 @@ 1.11 length.load_item(); 1.12 1.13 } 1.14 - if (needs_store_check) { 1.15 + if (needs_store_check || x->check_boolean()) { 1.16 value.load_item(); 1.17 } else { 1.18 value.load_for_store(x->elt_type()); 1.19 @@ -331,7 +331,8 @@ 1.20 // Seems to be a precise 1.21 post_barrier(LIR_OprFact::address(array_addr), value.result()); 1.22 } else { 1.23 - __ move(value.result(), array_addr, null_check_info); 1.24 + LIR_Opr result = maybe_mask_boolean(x, array.result(), value.result(), null_check_info); 1.25 + __ move(result, array_addr, null_check_info); 1.26 } 1.27 } 1.28