[all-commits] [llvm/llvm-project] 2a9f77: [Reassociate] Invalidate analysis passes after can...
Björn Pettersson via All-commits
all-commits at lists.llvm.org
Wed Apr 23 03:52:22 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2a9f77f6bd48d757b2d45aadcb6cf76ef4b4ef32
https://github.com/llvm/llvm-project/commit/2a9f77f6bd48d757b2d45aadcb6cf76ef4b4ef32
Author: Björn Pettersson <bjorn.a.pettersson at ericsson.com>
Date: 2025-04-23 (Wed, 23 Apr 2025)
Changed paths:
M llvm/lib/Transforms/Scalar/Reassociate.cpp
A llvm/test/Transforms/Reassociate/canonicalize-made-change.ll
Log Message:
-----------
[Reassociate] Invalidate analysis passes after canonicalizeOperands (#136835)
When ranking operands for an expression tree the reassociate pass also
perform canonicalization, putting constants on the right hand side. Such
transforms was however not registered as modifying the IR. So at the end
of the pass, if not having made any other changes, the pass returned
that all analyses should be kept.
With this patch we make sure to set MadeChange to true when modifying
the IR via canonicalizeOperands. This is to make sure analyses such as
DemandedBits are properly invalidated when instructions are modified.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list