RFR: 8280476: [macOS] : hotspot arm64 bug exposed by latest clang

Kim Barrett kbarrett at openjdk.java.net
Sat Jan 29 08:20:10 UTC 2022


On Fri, 28 Jan 2022 16:49:32 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

> A trivial fix to solve undefined behavior in src/hotspot/cpu/aarch64/immediate_aarch64.cpp:
> replicate().
> 
> I was not able to reproduce the reported failure using:
> 
>   Xcode: Version 13.2.1 (13C100) which includes clang Apple LLVM 13.0.0 (clang-1300.0.29.30)
> 
> so I'm moving forward with the proposed fix from a code inspection
> point of view.
> 
> I've tested this fix with Mach5 Tier[1-6]. Tier1 and Tier2 have completed with
> no failures. Tier[3-6] are still running.

Changes requested by kbarrett (Reviewer).

src/hotspot/cpu/aarch64/immediate_aarch64.cpp line 136:

> 134:   if (nbits == 64) {
> 135:     assert(count <= 1, "must be");
> 136:     return bits;

For consistency with the < 64 case, shouldn't this be `return (count == 0) ? 0 : bits;` ?

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

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


More information about the hotspot-compiler-dev mailing list