diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-26 10:58:03 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-26 10:58:03 -0800 |
commit | 5f237dc0f2594b9f3b2a6c02cf8ddb026873f210 (patch) | |
tree | a019c264b2e756b12a77488816c7c567a03bf3a6 | |
parent | 547e6d4d13108f7b9a9c0c81451b623017dd7eff (diff) | |
parent | 710881e071370e7acd66cbc5dca03e778e6ca12b (diff) |
Merge pull request #23 from sunfishcode/incoming
Incoming
-rw-r--r-- | lib/Target/JSBackend/JSBackend.cpp | 7 | ||||
-rw-r--r-- | lib/Transforms/NaCl/PNaClABISimplify.cpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp index a0c199e7db..5074378efb 100644 --- a/lib/Target/JSBackend/JSBackend.cpp +++ b/lib/Target/JSBackend/JSBackend.cpp @@ -1507,10 +1507,9 @@ void JSWriter::generateExpression(const User *I, raw_string_ostream& Code) { break; } case Instruction::Select: { - const SelectInst* SI = cast<SelectInst>(I); - Code << getAssignIfNeeded(I) << getValueAsStr(SI->getCondition()) << " ? " << - getValueAsStr(SI->getTrueValue()) << " : " << - getValueAsStr(SI->getFalseValue()); + Code << getAssignIfNeeded(I) << getValueAsStr(I->getOperand(0)) << " ? " << + getValueAsStr(I->getOperand(1)) << " : " << + getValueAsStr(I->getOperand(2)); break; } case Instruction::AtomicCmpXchg: { diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp index e7dcba353f..1ed0d7841a 100644 --- a/lib/Transforms/NaCl/PNaClABISimplify.cpp +++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp @@ -83,7 +83,9 @@ void llvm::PNaClABISimplifyAddPreOptPasses(PassManager &PM) { } void llvm::PNaClABISimplifyAddPostOptPasses(PassManager &PM) { +#if 0 // XXX EMSCRIPTEN: No need for this. PM.add(createRewritePNaClLibraryCallsPass()); +#endif // We place ExpandByVal after optimization passes because some byval // arguments can be expanded away by the ArgPromotion pass. Leaving |