mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8282221: x86 intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long
Reviewed-by: sviswanathan, kvn, jbhateja
This commit is contained in:
parent
0b867b5e73
commit
37e28aea27
20 changed files with 1155 additions and 2 deletions
|
@ -21,7 +21,6 @@
|
|||
* questions.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "jvm_io.h"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
|
@ -3500,6 +3499,36 @@ void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& f
|
|||
}
|
||||
break;
|
||||
|
||||
case Op_UModI:
|
||||
if (UseDivMod) {
|
||||
// Check if a%b and a/b both exist
|
||||
Node* d = n->find_similar(Op_UDivI);
|
||||
if (d) {
|
||||
// Replace them with a fused unsigned divmod if supported
|
||||
if (Matcher::has_match_rule(Op_UDivModI)) {
|
||||
UDivModINode* divmod = UDivModINode::make(n);
|
||||
d->subsume_by(divmod->div_proj(), this);
|
||||
n->subsume_by(divmod->mod_proj(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Op_UModL:
|
||||
if (UseDivMod) {
|
||||
// Check if a%b and a/b both exist
|
||||
Node* d = n->find_similar(Op_UDivL);
|
||||
if (d) {
|
||||
// Replace them with a fused unsigned divmod if supported
|
||||
if (Matcher::has_match_rule(Op_UDivModL)) {
|
||||
UDivModLNode* divmod = UDivModLNode::make(n);
|
||||
d->subsume_by(divmod->div_proj(), this);
|
||||
n->subsume_by(divmod->mod_proj(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case Op_LoadVector:
|
||||
case Op_StoreVector:
|
||||
case Op_LoadVectorGather:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue