diff options
Diffstat (limited to 'lib/Target/JSBackend/JSBackend.cpp')
-rw-r--r-- | lib/Target/JSBackend/JSBackend.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp index a08e61fbff..5efd4c5684 100644 --- a/lib/Target/JSBackend/JSBackend.cpp +++ b/lib/Target/JSBackend/JSBackend.cpp @@ -521,7 +521,10 @@ std::string JSWriter::getPhiCode(const BasicBlock *From, const BasicBlock *To) { // we found it const std::string &name = getJSName(P); assigns[name] = getAssign(P); - const Value *V = P->getIncomingValue(index); + // Get the operand, and strip pointer casts, since normal expression + // translation also strips pointer casts, and we want to see the same + // thing so that we can detect any resulting dependencies. + const Value *V = P->getIncomingValue(index)->stripPointerCasts(); values[name] = V; std::string vname = getValueAsStr(V); if (const Instruction *VI = dyn_cast<const Instruction>(V)) { |