diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-07 18:26:47 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-07 18:26:47 -0800 |
commit | 88e3e6c307f0879687d02e062a7a3618abf74075 (patch) | |
tree | 949d7fb71392ba0fba14fdb489f50bb15c7d0534 /lib/Target/JSBackend/JSBackend.cpp | |
parent | 0240905bd78050f880d5e17431370fd74c800e43 (diff) |
do not nativize vectors
Diffstat (limited to 'lib/Target/JSBackend/JSBackend.cpp')
-rw-r--r-- | lib/Target/JSBackend/JSBackend.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp index 703995a517..197cdf7f0f 100644 --- a/lib/Target/JSBackend/JSBackend.cpp +++ b/lib/Target/JSBackend/JSBackend.cpp @@ -1776,7 +1776,8 @@ void JSWriter::calculateNativizedVars(const Function *F) { for (Function::const_iterator BI = F->begin(), BE = F->end(); BI != BE; ++BI) { for (BasicBlock::const_iterator II = BI->begin(), E = BI->end(); II != E; ++II) { const Instruction *I = &*II; - if (I->getOpcode() == Instruction::Alloca) { + if (const AllocaInst *AI = dyn_cast<const AllocaInst>(I)) { + if (AI->getAllocatedType()->isVectorTy()) continue; // we do not nativize vectors, we rely on the LLVM optimizer to avoid load/stores on them // this is on the stack. if its address is never used nor escaped, we can nativize it bool Fail = false; for (Instruction::const_use_iterator UI = I->use_begin(), UE = I->use_end(); UI != UE && !Fail; ++UI) { |