[llvm] [EarlyCSE] De-Duplicate callsites with differing attrs (PR #110929)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 09:14:07 PDT 2024


================
@@ -876,7 +876,8 @@ class Instruction : public User,
   /// Return true if the specified instruction is exactly identical to the
   /// current one. This means that all operands match and any extra information
   /// (e.g. load is volatile) agree.
-  bool isIdenticalTo(const Instruction *I) const LLVM_READONLY;
+  bool isIdenticalTo(const Instruction *I,
+                     bool IntersectAttrs = false) const LLVM_READONLY;
----------------
nikic wrote:

And in that case I'd also move the attribute intersection into combineIRFlags.

https://github.com/llvm/llvm-project/pull/110929


More information about the llvm-commits mailing list