Browse Source

Disalbe bswap constant folding

cl-refactor
Paweł Bylica 10 years ago
parent
commit
ae6e70913a
  1. 5
      libevmjit/Endianness.cpp

5
libevmjit/Endianness.cpp

@ -22,8 +22,9 @@ llvm::Value* Endianness::bswapIfLE(llvm::IRBuilder<>& _builder, llvm::Value* _wo
if (tester{1}.isLE) if (tester{1}.isLE)
{ {
if (auto constant = llvm::dyn_cast<llvm::ConstantInt>(_word)) // FIXME: Disabled because of problems with BYTE
return _builder.getInt(constant->getValue().byteSwap()); //if (auto constant = llvm::dyn_cast<llvm::ConstantInt>(_word))
// return _builder.getInt(constant->getValue().byteSwap());
// OPT: Cache func declaration? // OPT: Cache func declaration?
auto bswapFunc = llvm::Intrinsic::getDeclaration(_builder.GetInsertBlock()->getParent()->getParent(), llvm::Intrinsic::bswap, Type::Word); auto bswapFunc = llvm::Intrinsic::getDeclaration(_builder.GetInsertBlock()->getParent()->getParent(), llvm::Intrinsic::bswap, Type::Word);

Loading…
Cancel
Save