RFR: 8285301: C2: assert(!requires_atomic_access) failed: can't ensure atomicity [v2]

Tobias Hartmann thartmann at openjdk.java.net
Thu Apr 28 05:34:32 UTC 2022


On Wed, 27 Apr 2022 20:07:28 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Tobias Hartmann has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Removed default arg
>>  - Invoking Opcode only once. Added comment to test
>
> src/hotspot/share/opto/memnode.cpp line 1322:
> 
>> 1320:   assert(has_reinterpret_variant(vt), "no reinterpret variant: %s %s", Name(), type2name(bt));
>> 1321:   bool require_atomic_access = (Opcode() == Op_StoreL && ((StoreLNode*)this)->require_atomic_access()) ||
>> 1322:                                (Opcode() == Op_StoreD && ((StoreDNode*)this)->require_atomic_access());
> 
> Call `Opcode()` once.

Done.

> src/hotspot/share/opto/memnode.hpp line 610:
> 
>> 608:   static StoreNode* make(PhaseGVN& gvn, Node* c, Node* mem, Node* adr,
>> 609:                          const TypePtr* at, Node* val, BasicType bt,
>> 610:                          MemOrd mo = MemNode::unordered, bool require_atomic_access = false);
> 
> I think it was intentionally `MemOrd mo` parameter did not specify default value so that value is always specified at all call sites. I think this change is not required for the fix.

Okay, I reverted that change.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8422


More information about the hotspot-dev mailing list