From 8e6a866a5bb52abb30d85ff8e85e6d69776c81dc Mon Sep 17 00:00:00 2001 From: nodchip Date: Fri, 15 Oct 2010 07:48:20 +0000 Subject: [PATCH] JitIL: Fixed the folding rules. This was the underlying bug of the bad collision checking bug reported in Issue 3097. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6283 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp index b2561903e2..a0cb2d91b4 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp @@ -549,7 +549,7 @@ InstLoc IRBuilder::FoldSub(InstLoc Op1, InstLoc Op2) { // Fold Mul opcode. Some rules are ported from LLVM InstLoc IRBuilder::FoldMul(InstLoc Op1, InstLoc Op2) { - simplifyCommutative(Or, Op1, Op2); + simplifyCommutative(Mul, Op1, Op2); // i0 * i1 => (i0 * i1) if (isImm(*Op1) && isImm(*Op2)) { @@ -774,7 +774,7 @@ InstLoc IRBuilder::FoldOr(InstLoc Op1, InstLoc Op2) { } InstLoc IRBuilder::FoldXor(InstLoc Op1, InstLoc Op2) { - simplifyCommutative(Or, Op1, Op2); + simplifyCommutative(Xor, Op1, Op2); if (isImm(*Op1) && isImm(*Op2)) { return EmitIntConst(GetImmValue(Op1) ^ GetImmValue(Op2));