FEX
FEX copied to clipboard
IR: ConstProp potentially incorrect mask
https://github.com/FEX-Emu/FEX/blob/main/External/FEXCore/Source/Interface/IR/Passes/ConstProp.cpp#L358
This mask value is set but never used. Looks like it should be used in place of imm on line auto newArg = RemoveUselessMasking(IREmit, IROp->Args[i], imm); but needs to be investigated.
I'll take a look
The code there is definitely buggy, however as RemoveUselessMasking has been disabled it doesn't actually optimize anything.
Related: #594
The only functional parts of the optimization are
- BFE/SBFE (partially)
- VFADD/VFSUB/VFMUL/VFDIV/FCMP
- VMOV (partially)
I think the entire optimization pass needs a rewrite, both to work out the kinks, and to be faster