Issue 142765
Summary Missed optimization: equivalent expressions generate different assembly with extra load
Labels new issue
Assignees
Reporter gh228df
    The Clang optimizer fails to generate equally efficient assembly for semantically equivalent expressions. The function sub_bytes() produces less optimal code than its logically equivalent counterpart sub_bytes_alt() or a version manually restructured to match optimized assembly.

Clang should recognize the algebraic equivalence of the expressions in sub_bytes() and optimize them the same way it does for sub_bytes_alt() or sub_bytes_asm().

---

Compiler Explorer: https://godbolt.org/z/rscej9nds


_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to