aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAlan Zhao <ayzhao@google.com>2025-10-06 11:58:35 -0700
committerGitHub <noreply@github.com>2025-10-06 18:58:35 +0000
commitfea9ef325bb89b9b0de4bf703cababd8d226c3d5 (patch)
treef3feb9733631a377e35ebfdb327d27a4a84edefe /clang/lib/Frontend/CompilerInvocation.cpp
parentbf0a6ae09556c119b582b7cdb3e2dce354b37c17 (diff)
downloadllvm-fea9ef325bb89b9b0de4bf703cababd8d226c3d5.zip
llvm-fea9ef325bb89b9b0de4bf703cababd8d226c3d5.tar.gz
llvm-fea9ef325bb89b9b0de4bf703cababd8d226c3d5.tar.bz2
[InstCombine] Preserve profile branch weights when folding logical booleans (#161293)
Logical booleans in LLVM are represented by select statements - e.g. the statement ``` A && B ``` is represented as ``` select i1 %A, i1 %B, i1 false ``` When LLVM folds two of the same logical booleans into a logical boolean and a bitwise boolean (e.g. `A && B && C` -> `A && (B & C)`), the first logical boolean is a select statement that retains the original condition from the first logical boolean of the original statement. This means that the new select statement has the branch weights as the original select statement. Tracking issue: #147390
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions