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.
2.9 KiB
2.9 KiB