Files
clang-p2996/llvm/test/CodeGen/AArch64/selectopt-const.ll
David Green 1789534ac1 [SelectOpt] Don't convert constant selects to branches. (#110858)
Selects that choose between two constants will be less profitable to
turn into branches, especially if the constants can be folded somehow
into the surrounding instructions. They will also be cost modelled in a
way that can make them over-optimistically converted to branches, as
neither branch will have a latency depth but the constants still need to
be materialized.

This patch disabled selectopt for selects with two constant branches. It
is currently in the target independent part, as it sounds generic, but I
could move it into AArch64 if needed.
2024-10-05 16:17:22 +01:00

2.9 KiB