aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__algorithm/comp.h
diff options
context:
space:
mode:
authorAlan Zhao <ayzhao@google.com>2025-10-03 10:19:08 -0700
committerGitHub <noreply@github.com>2025-10-03 10:19:08 -0700
commitc54d0d7a9630f5a554cd9cc9d14262cad216efed (patch)
treef7639447b2473575b5bc23512029319e76e2efb4 /libcxx/include/__algorithm/comp.h
parent1af8ed1988289ee4555cc75d1f6750a1098b6919 (diff)
downloadllvm-c54d0d7a9630f5a554cd9cc9d14262cad216efed.zip
llvm-c54d0d7a9630f5a554cd9cc9d14262cad216efed.tar.gz
llvm-c54d0d7a9630f5a554cd9cc9d14262cad216efed.tar.bz2
[InstCombine] Preserve profile after folding select instructions with conditionals (#159666)
If `select` simplification produces the transform: ``` (select A && B, T, F) -> (select A, T, F) ``` or ``` (select A || B, T, F) -> (select A, T, F) ``` it stands to reason that if the branches are the same, then the branch weights remain the same since the net effect is a simplification of the conditional. There are also cases where InstCombine negates the conditional (and therefore reverses the branches); this PR asserts that the branch weights are reversed in this case. Tracking issue: #147390
Diffstat (limited to 'libcxx/include/__algorithm/comp.h')
0 files changed, 0 insertions, 0 deletions