[PATCH] D155055: [WIP][AMDGPU] Divergence-driven instruction selection for fshr

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 16 06:23:36 PDT 2023


foad added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/bf16.ll:631
 ; GCN-NEXT:    s_mov_b32 s6, 0
-; GCN-NEXT:    v_alignbit_b32 v0, v1, v0, 16
+; GCN-NEXT:    v_or_b32_e32 v0, v0, v1
 ; GCN-NEXT:    s_mov_b32 s7, 0xf000
----------------
foad wrote:
> There are lots of minor regressions like this. I will investigate.
The problem here is that really need to combine shifts and ORs into fshr post-legalization. This no longer happens automatically because we have marked fshr as Custom instead of Legal. I could do it with a target-specific OR combine, but I can't find any way to call back into helper code like MatchRotate in the generic DAGCombiner from a target-specific combine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155055/new/

https://reviews.llvm.org/D155055



More information about the llvm-commits mailing list