From ae6e70913aebc9a4ab645b8ae97cf2c1f715d9a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 2 Jan 2015 14:02:30 +0100 Subject: [PATCH] Disalbe bswap constant folding --- libevmjit/Endianness.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libevmjit/Endianness.cpp b/libevmjit/Endianness.cpp index be62ac058..db7edfdc9 100644 --- a/libevmjit/Endianness.cpp +++ b/libevmjit/Endianness.cpp @@ -22,8 +22,9 @@ llvm::Value* Endianness::bswapIfLE(llvm::IRBuilder<>& _builder, llvm::Value* _wo if (tester{1}.isLE) { - if (auto constant = llvm::dyn_cast(_word)) - return _builder.getInt(constant->getValue().byteSwap()); + // FIXME: Disabled because of problems with BYTE + //if (auto constant = llvm::dyn_cast(_word)) + // return _builder.getInt(constant->getValue().byteSwap()); // OPT: Cache func declaration? auto bswapFunc = llvm::Intrinsic::getDeclaration(_builder.GetInsertBlock()->getParent()->getParent(), llvm::Intrinsic::bswap, Type::Word);