[SROA] Improve handleling of assumes bundles by SROA
authorTyker <tyker1@outlook.com>
Fri, 28 Aug 2020 19:46:16 +0000 (21:46 +0200)
committerTyker <tyker1@outlook.com>
Fri, 28 Aug 2020 19:55:45 +0000 (21:55 +0200)
commit6d3657417e0c75611fc52c4adefa0cdf27e89fb1
tree96e3c39aba5ec05dbfaea889070b8dc2e682a07f
parentffe05dd12593f979f235cd34fd467a4c30e051f8
[SROA] Improve handleling of assumes bundles by SROA

This patch fixes this crash https://gcc.godbolt.org/z/Ps8d1e
And gives SROA the ability to remove assumes if it allows promoting an alloca to register
Without removing assumes when it can't promote to register.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D86570
llvm/include/llvm/IR/Value.h
llvm/lib/IR/Value.cpp
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Transforms/SROA/assume.ll [new file with mode: 0644]
llvm/test/Transforms/SROA/ignore-droppable.ll