mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
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
This commit is contained in:
parent
59381f8343
commit
8e6a866a5b
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user