[PATCH] D128073: [SROA] Try harder to find a vector promotion viable type when rewriting

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 09:57:08 PDT 2022


nikic added a comment.

I'm not sure I understand how this change works. isVectorPromotionViable() doesn't seem to use SliceTy at all, it computes its own candidate types. Why does the picked slice type matter for vector promotion?



================
Comment at: llvm/test/Transforms/SROA/sroa-common-type-fail-promotion.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -mtriple=amdgcn-amd-amdhsa -mcpu=gfx908 -passes=sroa -opaque-pointers -S < %s | FileCheck %s
+
----------------
`-mtriple=amdgcn-amd-amdhsa -mcpu=gfx908` is likely unnecessary here. `-opaque-pointers` can also be dropped (it's the default).


================
Comment at: llvm/test/Transforms/SROA/sroa-common-type-fail-promotion.ll:20
+entry:
+  %b_blockwise_copy = alloca %"struct.b", align 16, addrspace(5)
+  store <8 x half> zeroinitializer, ptr addrspace(5) %b_blockwise_copy, align 16
----------------
The address spaces don't look essential for the test and add a lot of noise -- can probably be dropped.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128073



More information about the llvm-commits mailing list