RFR: JDK-8306304: Fix xlc17 clang warnings in ppc and aix code [v2]

Kim Barrett kbarrett at openjdk.org
Fri May 12 22:07:55 UTC 2023


On Fri, 12 May 2023 15:16:36 GMT, Tyler Steele <tsteele at openjdk.org> wrote:

>> JoKern65 has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   cosmetic changes
>
> src/hotspot/cpu/ppc/c1_LIRGenerator_ppc.cpp line 426:
> 
>> 424:   // Missing test if instr is commutative and if we should swap.
>> 425:   if (right.value()->type()->as_LongConstant() &&
>> 426:       (x->op() == Bytecodes::_lsub && right.value()->type()->as_LongConstant()->value() == -32768 ) ) {
> 
> I would prefer a shifted value here as it's usually more readable. If the compiler is being stubborn in its warnings, a comment explaining the magic value would be fine too.

What is the warning here?  Note that we've already turned off `-Wshift-negative-value` for gcc and xlc
(but not for clang, for some reason).  See `# Disabled warnings` in CompileJvm.gmk.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13953#discussion_r1192821299


More information about the hotspot-dev mailing list