mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-28 03:39:55 +00:00
PPU LLVM: simplify VMSUMUHS
This commit is contained in:
parent
d2d07abcc5
commit
03e6725fcf
@ -1114,13 +1114,13 @@ void PPUTranslator::VMSUMUHS(ppu_opcode_t op)
|
||||
{
|
||||
const auto a = get_vr<u32[4]>(op.va);
|
||||
const auto b = get_vr<u32[4]>(op.vb);
|
||||
const auto c = get_vr<s32[4]>(op.vc);
|
||||
const auto ml = bitcast<s32[4]>((a << 16 >> 16) * (b << 16 >> 16));
|
||||
const auto mh = bitcast<s32[4]>((a >> 16) * (b >> 16));
|
||||
const auto c = get_vr<u32[4]>(op.vc);
|
||||
const auto ml = bitcast<u32[4]>((a << 16 >> 16) * (b << 16 >> 16));
|
||||
const auto mh = bitcast<u32[4]>((a >> 16) * (b >> 16));
|
||||
const auto s = eval(ml + mh);
|
||||
const auto s2 = eval(s + c);
|
||||
const auto x = eval((ucarry(ml, mh, s) | ucarry(s, c, s2)) >> 31);
|
||||
set_vr(op.vd, eval(s2 | x));
|
||||
const auto x = eval(s < ml | s2 < s);
|
||||
set_vr(op.vd, select(x, splat<u32[4]>(-1), s2));
|
||||
SetSat(IsNotZero(x.value));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user