[all-commits] [llvm/llvm-project] f93cd5: [BPI] Avoid ConstantExpr::get()
Nikita Popov via All-commits
all-commits at lists.llvm.org
Mon Jul 4 07:04:42 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f93cd56262d1db6e00acf81b5fa4aff6c837a07b
https://github.com/llvm/llvm-project/commit/f93cd56262d1db6e00acf81b5fa4aff6c837a07b
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-07-04 (Mon, 04 Jul 2022)
Changed paths:
M llvm/lib/Analysis/BranchProbabilityInfo.cpp
Log Message:
-----------
[BPI] Avoid ConstantExpr::get()
Use ConstantFoldBinaryOpOperands() instead, to prepare for the case
where not all binary operators have a constant expression form.
I believe this code actually intended to set OnlyIfReduced=true,
however ConstantExpr::get() actually accepts a Flags argument at
that position (and OnlyIfReducedTy as the next argument), so this
ended up creating a constant expression with some random flag
(probably exact or nuw depending on which).
More information about the All-commits
mailing list