[PATCH] D128123: [SDAG] try to replace subtract-from-constant with xor
Amaury SECHET via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 26 18:40:48 PDT 2022
deadalnix added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/ds-sub-offset.ll:132
+; GFX10-NEXT: ds_write_b8 v0, v1
; GFX10-NEXT: s_endpgm
%x.i = call i32 @llvm.amdgcn.workitem.id.x() #0
----------------
spatel wrote:
> RKSimon wrote:
> > RKSimon wrote:
> > > Based off @foad's comments on D128080 - we need to either add a TLI override to control this or add a way for AMDGPU to reverse it.
> > Hmm - how similar is TargetLowering::preferIncOfAddToSubOfNot ?
> At first glance, that seems more about constant materialization while this is about a "sub-from" instruction with an immediate operand.
>
> That hook is default true but overridden to false for vector types by ARM/AArch/PowerPC.
TBH, it seems like a missed opportunity from the AMDGPU backend rather than a major problem with this patch.
Isn't there someone from AMD we can get help from here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128123/new/
https://reviews.llvm.org/D128123
More information about the llvm-commits
mailing list