[PATCH] D114643: [AMDGPU] Aggressively fold immediates in SIFoldOperands
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 26 08:42:27 PST 2021
foad added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/flat-scratch.ll:82-86
+; GFX10-NEXT: v_mov_b32_e32 v2, 15
; GFX10-NEXT: v_lshlrev_b32_e32 v1, 2, v1
-; GFX10-NEXT: v_add_nc_u32_e32 v0, v2, v0
-; GFX10-NEXT: v_add_nc_u32_e32 v1, v2, v1
-; GFX10-NEXT: scratch_store_dword v0, v3, off
+; GFX10-NEXT: v_add_nc_u32_e32 v0, 4, v0
+; GFX10-NEXT: v_add_nc_u32_e32 v1, 4, v1
+; GFX10-NEXT: scratch_store_dword v0, v2, off
----------------
sebastian-ne wrote:
> Not really related to this patch, but shouldn’t we be able to inline v2 (15) into the scratch_store?
No, v2 is the value being stored, and it has to be in a vgpr for that instruction (not even an inline constant is allowed).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114643/new/
https://reviews.llvm.org/D114643
More information about the llvm-commits
mailing list