[PATCH] D140665: [SelectionDAG][RISCV][X86][AArch64][AMDGPU][PowerPC] Improve SimplifyDemandedBits for SHL with NUW/NSW flags.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 27 09:01:33 PST 2022
arsenm added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/shl.ll:492
; VI-NEXT: s_waitcnt lgkmcnt(0)
+; VI-NEXT: s_and_b32 s4, s4, 15
; VI-NEXT: s_lshl_b32 s4, s4, 12
----------------
This is worse
================
Comment at: llvm/test/CodeGen/AMDGPU/wwm-reserved-spill.ll:48
; GFX9-O0-NEXT: v_cmp_eq_u32_e64 s[40:41], v3, v4
-; GFX9-O0-NEXT: v_cndmask_b32_e64 v3, 0, 1, s[40:41]
-; GFX9-O0-NEXT: s_mov_b32 s35, 1
-; GFX9-O0-NEXT: v_lshlrev_b32_e64 v3, s35, v3
+; GFX9-O0-NEXT: v_cndmask_b32_e64 v3, 0, -1, s[40:41]
; GFX9-O0-NEXT: s_mov_b32 s35, 2
----------------
This is obviously better, but also is -O0
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140665/new/
https://reviews.llvm.org/D140665
More information about the llvm-commits
mailing list