[PATCH] D136284: SROA should freeze undefs for loads with no prior stores
Jamie Schmeiser via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 12:21:56 PDT 2022
jamieschmeiser created this revision.
jamieschmeiser added reviewers: nikic, tstellar.
Herald added subscribers: nlopes, kosarev, kerbowa, hiraditya, arichardson, jvesely.
Herald added a project: All.
jamieschmeiser requested review of this revision.
Herald added projects: clang, LLVM.
Herald added a subscriber: cfe-commits.
SROA will replace loads of an alloca with undef when there are no
prior stores. However, multiple loads of the same memory must be
equal. Insert freeze instructions so that loads of the same alloca
with no prior store will compare correctly.
See new lit test /Transforms/SROA/same-promoted-undefs.ll for sample
IR that is fixed by this change.
Also fix up existing lit tests. @tstellar, please examine the AMD test changes.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D136284
Files:
clang/test/CodeGen/LoongArch/inline-asm-gcc-regs.c
clang/test/CodeGenCXX/return.cpp
clang/test/CodeGenOpenCL/overload.cl
llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
llvm/test/CodeGen/AMDGPU/promote-alloca-vector-to-vector.ll
llvm/test/CodeGen/AMDGPU/vector-alloca-limits.ll
llvm/test/Transforms/Mem2Reg/pr24179.ll
llvm/test/Transforms/Mem2Reg/preserve-nonnull-load-metadata.ll
llvm/test/Transforms/PhaseOrdering/X86/nancvt.ll
llvm/test/Transforms/SROA/address-spaces.ll
llvm/test/Transforms/SROA/addrspacecast.ll
llvm/test/Transforms/SROA/alloca-address-space.ll
llvm/test/Transforms/SROA/basictest.ll
llvm/test/Transforms/SROA/phi-and-select.ll
llvm/test/Transforms/SROA/phi-gep.ll
llvm/test/Transforms/SROA/phi-with-duplicate-pred.ll
llvm/test/Transforms/SROA/pr37267.ll
llvm/test/Transforms/SROA/same-promoted-undefs.ll
llvm/test/Transforms/SROA/scalable-vectors.ll
llvm/test/Transforms/SROA/select-load.ll
llvm/test/Transforms/SROA/slice-width.ll
llvm/test/Transforms/SROA/sroa-common-type-fail-promotion.ll
llvm/test/Transforms/SROA/vector-conversion.ll
llvm/test/Transforms/SROA/vector-promotion.ll
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_asm.ll.expected
llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/amdgpu_isel.ll.expected
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136284.469003.patch
Type: text/x-patch
Size: 55562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221019/b5d64b7e/attachment-0001.bin>
More information about the cfe-commits
mailing list