Issue 180970
Summary [RISC-V] Missed Opportunity for MULHR variants
Labels new issue
Assignees
Reporter christian-herber-nxp
    There is a typical C code pattern, that can be implemented as a MULHR instruction.

https://godbolt.org/z/nhEje8qdc

Currently, the P extension is used for this, but only by using the widening multiplication.
The whole thing should be equivalent to a rounding MULH.

This is a common code sequence in NNs.
CMSIS-NN calls this function nn_doubling_high_mult_no_sat.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to