RFR: 8270848: Redundant unsafe opmask register allocation in some instruction patterns. [v2]

Jatin Bhateja jbhateja at openjdk.java.net
Fri Jul 30 12:38:28 UTC 2021


On Thu, 29 Jul 2021 01:19:42 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> From correctness point of view changes are good - we should check features instead of `UseAVX` flag. As we found hard way, not all avx512 CPUs supports all avx512 features.
> But it means that this change is only useful on KNL cpus. Or you have other cases?

Hi @vnkozlov 
Problem will mainly be seen on KNL since they lack VL feature, thus Matcher::has_predicate_register will return a false,  but for these patterns opmaks argument will still get allocated. Pulling the feature check out up till the predicate level will guide the matcher to select appropriate patterns without opmask operands for KNL. 

Your suggested changes have been incorporated.

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

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


More information about the hotspot-compiler-dev mailing list