[PATCH] D128123: [SDAG] try to replace subtract-from-constant with xor
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 20 03:33:49 PDT 2022
spatel planned changes to this revision.
spatel 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
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128123/new/
https://reviews.llvm.org/D128123
More information about the llvm-commits
mailing list