SPU LLVM: Rearange FM instruction for better performance

- Doesn't eliminate any instructions, but allows for better out of order execution.
This commit is contained in:
Malcolm Jestadt 2021-03-04 12:16:12 -05:00 committed by Ivan
parent 6d91a9fe6f
commit e5d0e035d0
1 changed files with 3 additions and 3 deletions

View File

@ -7750,9 +7750,9 @@ public:
const auto ma = eval(sext<s32[4]>(fcmp_uno(a != fsplat<f32[4]>(0.))));
const auto mb = eval(sext<s32[4]>(fcmp_uno(b != fsplat<f32[4]>(0.))));
const auto ca = eval(bitcast<f32[4]>(bitcast<s32[4]>(a) & mb));
const auto cb = eval(bitcast<f32[4]>(bitcast<s32[4]>(b) & ma));
set_vr(op.rt, fm(ca, cb));
const auto cx = eval(ma & mb);
const auto x = fm(a, b);
set_vr(op.rt, eval(bitcast<f32[4]>(bitcast<s32[4]>(x) & cx)));
}
else
set_vr(op.rt, get_vr<f32[4]>(op.ra) * get_vr<f32[4]>(op.rb));