1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/Transforms/LowerSwitch
Andrew Kaylor 6fdd7c575a Fix a crash when the default of a switch is removed
This patch fixes a problem that occurs in LowerSwitch when a switch statement has a PHI node as its condition, and the PHI node only has two incoming blocks, and one of those incoming blocks is through an unreachable default in the switch statement. When this condition occurs, LowerSwitch holds a pointer to the condition value, but removes the switch block as a predecessor of the PHI block, causing the PHI node to be replaced. LowerSwitch then tries to use its stale pointer to the original condition value, causing a crash.

Differential Revision: https://reviews.llvm.org/D62560

llvm-svn: 362427
2019-06-03 17:54:15 +00:00
..
2003-05-01-PHIProblem.ll
2003-08-23-EmptySwitch.ll
2004-03-13-SwitchIsDefaultCrash.ll
2014-06-10-SwitchContiguousOpt.ll
2014-06-11-SwitchDefaultUnreachableOpt.ll
2014-06-23-PHIlowering.ll
condition-phi-unreachable-default.ll Fix a crash when the default of a switch is removed 2019-06-03 17:54:15 +00:00
delete-default-block-crash.ll
do-not-handle-impossible-values.ll
feature.ll
fold-popular-case-to-unreachable-default.ll
phi-in-dead-block.ll