[all-commits] [llvm/llvm-project] 9abe50: [SLP] Fix the trunc instruction insertion problem
Anton Afanasyev via All-commits
all-commits at lists.llvm.org
Wed Mar 17 03:52:11 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9abe5004733034a17e79ef6b7e9b19000c4ea4be
https://github.com/llvm/llvm-project/commit/9abe5004733034a17e79ef6b7e9b19000c4ea4be
Author: Bu Le <bule1 at huawei.com>
Date: 2021-03-17 (Wed, 17 Mar 2021)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
M llvm/test/Transforms/SLPVectorizer/AArch64/trunc-insertion.ll
Log Message:
-----------
[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.
More information about the All-commits
mailing list