-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compressbits and expandbits opcodes #7259
base: master
Are you sure you want to change the base?
Add compressbits and expandbits opcodes #7259
Conversation
Relies on #7252 for TRIL tests to work correctly |
@r30shah fyi |
Signed-off-by: Spencer Comin <spencer.comin@ibm.com>
Signed-off-by: Bradley Wood <bradley.wood@ibm.com>
Signed-off-by: Spencer Comin <spencer.comin@ibm.com> Co-Authored-By: Bhavani <81695814+bhavanisn@users.noreply.github.com>
Uses pext and pdep intrinsics on x86 when supported. Signed-off-by: Spencer Comin <spencer.comin@ibm.com>
e6854a6
to
bcf5ea4
Compare
Signed-off-by: Spencer Comin <spencer.comin@ibm.com>
Signed-off-by: Spencer Comin <spencer.comin@ibm.com>
Signed-off-by: Spencer Comin <spencer.comin@ibm.com>
bcf5ea4
to
eb12ac0
Compare
Instruction selection log excerpts: Powerexpandbits
compressbits
x86expandbits
compressbits
|
/* .reverseBranchOpCode = */ TR::BadILOp, \ | ||
/* .booleanCompareOpCode = */ TR::BadILOp, \ | ||
/* .ifCompareOpCode = */ TR::BadILOp, \ | ||
/* .description = compress bits: equivalent to calling Integer.compress(a, b) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems bit ambiguous what Integer.compress(a,b) is looking at the change just with OMR perspective.
@@ -11997,6 +11998,216 @@ TR::Node *sxorSimplifier(TR::Node * node, TR::Block * block, TR::Simplifier * s) | |||
return node; | |||
} | |||
|
|||
template <typename T> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a high level description for this function in Comment? Also same for compressBits simplifier.
{ | ||
T mask = maskChild->getConst<T>(); | ||
if (srcChild->getOpCode().isLoadConst() && | ||
performTransformation(s->comp(), "%sReduced %s of const src and const mask in node [%s] to const\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be more beneficial if someone tries to find out what transformed to print the node pointer (See other perform transformation usage).
{ | ||
foldConstant<T>(node, expandBits(srcChild->getConst<T>(), maskChild->getConst<T>()), s, false); | ||
} | ||
else if (mask == static_cast<T>(0) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as previous. Also please review and update further performTransformation messeges.
lcompressbits
,icompressbits
,scompressbits
,bcompressbits
lexpandbits
,iexpandbits
,sexpandbits
,bexpandbits
See #7172