diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-30 11:18:09 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-30 11:18:09 -0800 |
commit | 5f387757a1cc34a63e5539a6abcb07a58472b05e (patch) | |
tree | f33e2eb563dd62e3a847aa97190929296eae3bdb /lib/Transforms | |
parent | eea5cbe96fc5c5c2796c3ab3ea64f50fe350f75b (diff) |
assume worst-case alignment in PromoteIntegers, as we actually break on unaligned operations
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/NaCl/PromoteIntegers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/NaCl/PromoteIntegers.cpp b/lib/Transforms/NaCl/PromoteIntegers.cpp index eba89e3434..5c910d21c1 100644 --- a/lib/Transforms/NaCl/PromoteIntegers.cpp +++ b/lib/Transforms/NaCl/PromoteIntegers.cpp @@ -231,7 +231,7 @@ static Value *splitLoad(LoadInst *Inst, ConversionState &State) { HiType->getPointerTo(), OrigPtr->getName() + ".hity"); - Value *LoadHi = IRB.CreateLoad(BCHi, Inst->getName() + ".hi"); + Value *LoadHi = IRB.CreateAlignedLoad(BCHi, 1, Inst->getName() + ".hi"); // XXX EMSCRIPTEN: worst-case alignment assumption if (!isLegalSize(Width - LoWidth)) { LoadHi = splitLoad(cast<LoadInst>(LoadHi), State); // BCHi was still illegal, and has been replaced with a placeholder in the @@ -288,7 +288,7 @@ static Value *splitStore(StoreInst *Inst, ConversionState &State) { HiType->getPointerTo(), OrigPtr->getName() + ".hity"); - Value *StoreHi = IRB.CreateStore(HiTrunc, BCHi); + Value *StoreHi = IRB.CreateAlignedStore(HiTrunc, BCHi, 1); // XXX EMSCRIPTEN: worst-case alignment assumption if (!isLegalSize(Width - LoWidth)) { // HiTrunc is still illegal, and is redundant with the truncate in the |