Issue 154125
Summary [RISC-V] zero extension should be preferred over bit field extraction
Labels new issue
Assignees
Reporter christian-herber-nxp
    I have seen code size expansion in two workloads of embench-iot 1.0 (edn and picojpeg), when using the t-head bitfield extension.

I could not isolate a trivial code snippet. For anything simple, zext.h is used.

This is one where you can see and instruction in the style of th.extu rd, rs, 15, 0 being used in favor of zext.h:
https://godbolt.org/z/beb4r4Kzq

This is suboptimal, as zext.h can possibly be compressed. Might not be the case, here, but it happens elsewhere and hurts code density.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to