-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[AMDGPU] Don't rely on !eq comparing int with bits<5>. NFC. #113279
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
Conversation
Tweak VOP2eInst_Base so that it does not rely on !eq comparing an int value (-1) with a bits<5> value. This is to avoid a change in behaviour when llvm#112904 lands, which is a bug fix which has the side effect of implicitly casting template arguments to the declared template parameter type.
@llvm/pr-subscribers-backend-amdgpu Author: Jay Foad (jayfoad) ChangesTweak VOP2eInst_Base so that it does not rely on !eq comparing an int Full diff: https://github.com/llvm/llvm-project/pull/113279.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/VOP2Instructions.td b/llvm/lib/Target/AMDGPU/VOP2Instructions.td
index e83ea57c61df13..fbde3bb7d14111 100644
--- a/llvm/lib/Target/AMDGPU/VOP2Instructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP2Instructions.td
@@ -287,7 +287,7 @@ multiclass
let SchedRW = [Write32Bit] in {
let Uses = !if(useSGPRInput, [VCC, EXEC], [EXEC]) in {
- if !eq(VOPDOp, -1) then
+ if !empty(VOPDName) then
def _e32 : VOP2_Pseudo <opName, P>,
Commutable_REV<revOp#"_e32", !eq(revOp, opName)>;
else
@@ -319,7 +319,7 @@ multiclass
multiclass
VOP2eInst<string opName, VOPProfile P, SDPatternOperator node = null_frag,
string revOp = opName, bit useSGPRInput = !eq(P.NumSrcArgs, 3)>
- : VOP2eInst_Base<opName, P, -1, "", node, revOp, useSGPRInput>;
+ : VOP2eInst_Base<opName, P, 0, "", node, revOp, useSGPRInput>;
multiclass
VOP2eInst_VOPD<string opName, VOPProfile P, bits<5> VOPDOp, string VOPDName,
|
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 looks much nicer than "v_"
solution. Thanks.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/6512 Here is the relevant piece of the build log for the reference
|
Tweak VOP2eInst_Base so that it does not rely on !eq comparing an int
value (-1) with a bits<5> value. This is to avoid a change in behaviour
when #112904 lands, which is a bug fix which has the side effect of
implicitly casting template arguments to the declared template parameter
type.