You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PR #8888 added support for fmsub and fnmsub instructions to x64. This allows sinking loads and negations, which needed
to be executed when only the fmadd and fnmadd instructions where available. This improves code generation in most cases.
However, in cases where a value is both a sinkable load and negated, the order of those matters in the current implementation.
If the value is negated first then stored on the stack and loaded after, an fnmsub instruction could be generated, which would remove the need for explicit negation.
Feature
The fnmsub instruction should also be generated in cases where one of the multiplicands is negated first and then loaded.
Benefit
The generated code would be improved in this special case. By using the fnmsub instruction the multiplicand doesn't need to be negated first.
Implementation
There are test cases added in #8888 for adding both possible orders of negation and loading. Likely this can be achieved by adding additional rules to the lowering code. There would have to be rules for the special case, where negation happens first.
The text was updated successfully, but these errors were encountered:
* add fmsub and fnmsub instructions
* write tests for fmsub and fnmsub
* add a single runtest
* add more tests
* fix fmnsub_f32 test
* add reference to issue #8953
The PR #8888 added support for fmsub and fnmsub instructions to x64. This allows sinking loads and negations, which needed
to be executed when only the fmadd and fnmadd instructions where available. This improves code generation in most cases.
However, in cases where a value is both a sinkable load and negated, the order of those matters in the current implementation.
If the value is negated first then stored on the stack and loaded after, an fnmsub instruction could be generated, which would remove the need for explicit negation.
Feature
The fnmsub instruction should also be generated in cases where one of the multiplicands is negated first and then loaded.
Benefit
The generated code would be improved in this special case. By using the fnmsub instruction the multiplicand doesn't need to be negated first.
Implementation
There are test cases added in #8888 for adding both possible orders of negation and loading. Likely this can be achieved by adding additional rules to the lowering code. There would have to be rules for the special case, where negation happens first.
The text was updated successfully, but these errors were encountered: