[PATCH] D156302: [AMDGPU][GlobalISel] Select G_ICMP with G_SELECT to avoid extra copies
Mirko Brkusanin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 01:56:03 PDT 2023
mbrkusanin added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:2076
+ if (CCDef && CCDef->getOpcode() == TargetOpcode::G_ICMP &&
+ MRI->hasOneNonDBGUse(CCReg)) {
+ Register SrcReg = CCDef->getOperand(2).getReg();
----------------
Not sure if having a check for 'one use' is better or not. More lit tests will have improvements if it is removed but I was able to generate some cases where it was not beneficial.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156302/new/
https://reviews.llvm.org/D156302
More information about the llvm-commits
mailing list