HomePhabricator

[SLP] Fix the trunc instruction insertion problem

Authored by bule on Mar 17 2021, 3:15 AM.

Description

[SLP] Fix the trunc instruction insertion problem

Current SLP pass has this piece of code that inserts a trunc instruction
after the vectorized instruction. In the case that the vectorized instruction
is a phi node and not the last phi node in the BB, the trunc instruction
will be inserted between two phi nodes, which will trigger verify problem
in debug version or unpredictable error in another pass.
This patch changes the algorithm to 'if the last vectorized instruction
is a phi, insert it after the last phi node in current BB' to fix this problem.

Details

Committed
anton-afanasyevMar 17 2021, 3:51 AM
Parents
rG4b513b2458d9: [lldb] Correct typo in memory read error
Branches
Unknown
Tags
Unknown