[PATCH] D142756: AMDGPU: Try to select fneg modifier from xor
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 01:48:59 PST 2023
Pierre-vh added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:2602
+ } else {
+ Src = stripBitcast(Src);
+ if (Src.getOpcode() == ISD::XOR) {
----------------
Can we just do the stripBitcast call earlier? (at `Src = In`)
That way it simplifies the condition a bit (you can have a if/else if)
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:2603
+ Src = stripBitcast(Src);
+ if (Src.getOpcode() == ISD::XOR) {
+ // Match an integer fneg
----------------
Can you add a comment explaining why we need this special-case (like in the commit message) ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142756/new/
https://reviews.llvm.org/D142756
More information about the llvm-commits
mailing list