[PATCH] D102391: [AMDGPU][GlobalISel] Legalize G_ABS
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 20 05:42:59 PDT 2021
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:2320-2322
+ Register Zero = B.buildConstant(Ty, 0).getReg(0);
+ Register Sub = B.buildSub(Ty, Zero, SrcReg).getReg(0);
+ B.buildSMax(MI.getOperand(0), SrcReg, Sub);
----------------
I would hope that you could call the LegalizerHelper for this part. However I see the lower() implementation hardcodes one path and doesn't provide the helpers for the multiple options. Ideally we could clean that up
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102391/new/
https://reviews.llvm.org/D102391
More information about the llvm-commits
mailing list