diff options
author | Serguei Katkov <serguei.katkov@azul.com> | 2017-12-18 04:25:07 +0000 |
---|---|---|
committer | Serguei Katkov <serguei.katkov@azul.com> | 2017-12-18 04:25:07 +0000 |
commit | b0b67a8d38643f74c4d748cdbfdc8d78cd857319 (patch) | |
tree | 25ebf9d24a3e4002de5b37624ba26d289510db69 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 9da049fa8a76e1207f4f3582ee0c54e7b57d82b2 (diff) | |
download | bcm5719-llvm-b0b67a8d38643f74c4d748cdbfdc8d78cd857319.tar.gz bcm5719-llvm-b0b67a8d38643f74c4d748cdbfdc8d78cd857319.zip |
[CGP] Fix the handling select inst in complex addressing mode
When we put the value in select placeholder we must pass
the value through simplification tracker due to the value might
be already simplified and erased.
This is a fix for PR35658.
Reviewers: john.brawn, uabelho
Reviewed By: john.brawn
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41251
llvm-svn: 320956
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 1b01f843036..c4794380f79 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -2988,13 +2988,13 @@ private: ? CurrentBlock : nullptr }; assert(Map.find(TrueItem) != Map.end() && "No True Value!"); - Select->setTrueValue(Map[TrueItem]); + Select->setTrueValue(ST.Get(Map[TrueItem])); auto *FalseValue = CurrentSelect->getFalseValue(); ValueInBB FalseItem = { FalseValue, isa<Instruction>(FalseValue) ? CurrentBlock : nullptr }; assert(Map.find(FalseItem) != Map.end() && "No False Value!"); - Select->setFalseValue(Map[FalseItem]); + Select->setFalseValue(ST.Get(Map[FalseItem])); } else { // Must be a Phi node then. PHINode *PHI = cast<PHINode>(V); |