[PATCH] D109201: [AMDGPU] Process any power of 2 in optimizeCompareInstr
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 3 03:05:53 PDT 2021
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:8036
+ //
+ // Signed ge/gt are not used for the sign bit.
//
----------------
Yeah that is an ugly special case. Do we really need to handle ge/gt here at all? Can't we rely on something else canonicalizing them all to eq/ne comparisons?
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:8119
.add(*SrcOp)
- .addImm(0);
+ .addImm(Log2_64(Mask));
Def->eraseFromParent();
----------------
Isn't this just `BitNo`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109201/new/
https://reviews.llvm.org/D109201
More information about the llvm-commits
mailing list