From abc76c6b5b3e2eabd3fd3ceb96ffe02979dc8956 Mon Sep 17 00:00:00 2001 From: Martin Doerr Date: Wed, 11 Jun 2025 08:28:31 +0000 Subject: [PATCH] 8359126: [AIX] new test TestImplicitNullChecks.java fails Reviewed-by: rcastanedalo, dbriemann --- .../jtreg/compiler/gcbarriers/TestImplicitNullChecks.java | 5 ++++- .../compiler/lib/ir_framework/test/IREncodingPrinter.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/hotspot/jtreg/compiler/gcbarriers/TestImplicitNullChecks.java b/test/hotspot/jtreg/compiler/gcbarriers/TestImplicitNullChecks.java index a77a51312de..34583b8fea9 100644 --- a/test/hotspot/jtreg/compiler/gcbarriers/TestImplicitNullChecks.java +++ b/test/hotspot/jtreg/compiler/gcbarriers/TestImplicitNullChecks.java @@ -67,7 +67,10 @@ public class TestImplicitNullChecks { } @Test - @IR(applyIfOr = {"UseZGC", "true", "UseG1GC", "true"}, + // On AIX, implicit null checks are limited because the zero page is + // readable (but not writable). See os::zero_page_read_protected(). + @IR(applyIfPlatform = {"aix", "false"}, + applyIfOr = {"UseZGC", "true", "UseG1GC", "true"}, counts = {IRNode.NULL_CHECK, "1"}, phase = CompilePhase.FINAL_CODE) static Object testLoad(Outer o) { diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/test/IREncodingPrinter.java b/test/hotspot/jtreg/compiler/lib/ir_framework/test/IREncodingPrinter.java index 4ad95ab786f..eef9998ebf8 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/test/IREncodingPrinter.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/test/IREncodingPrinter.java @@ -62,6 +62,7 @@ public class IREncodingPrinter { // as adding non-existent platforms can lead to skipped tests. private static final List irTestingPlatforms = new ArrayList(Arrays.asList( // os.family + "aix", "linux", "mac", "windows", @@ -346,7 +347,9 @@ public class IREncodingPrinter { } String os = ""; - if (Platform.isLinux()) { + if (Platform.isAix()) { + os = "aix"; + } else if (Platform.isLinux()) { os = "linux"; } else if (Platform.isOSX()) { os = "mac";