[llvm] [FuncSpec] Improve handling of Comparison Instructions (PR #114073)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 08:16:58 PDT 2024
================
@@ -468,16 +468,25 @@ Constant *InstCostVisitor::visitCastInst(CastInst &I) {
Constant *InstCostVisitor::visitCmpInst(CmpInst &I) {
assert(LastVisited != KnownConstants.end() && "Invalid iterator!");
+ Constant *Const = LastVisited->second;
----------------
david-arm wrote:
It's not your fault, but I do feel the 'Swap' variable name is perhaps a bit misleading here. It seems to me that really the variable is true if the specialised value (that will be replaced by a constant) is on the RHS. It's almost like the variable should just be called `ConstOnRHS` or something like that.
https://github.com/llvm/llvm-project/pull/114073
More information about the llvm-commits
mailing list