[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:10:51 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:

We indeed don't want to compare SubclassOptionalData -- though now that I double check the code, we do need a call to combineIRFlags() in the CallValue case. This should be testable for a call with FMF flags.

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


More information about the llvm-commits mailing list