[llvm] [AArch64][InstCombine] Eliminate redundant barrier intrinsics (PR #112023)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 10:43:18 PDT 2024


================
@@ -2150,13 +2150,42 @@ static std::optional<Instruction *> instCombineSVEInsr(InstCombiner &IC,
   return std::nullopt;
 }
 
+static std::optional<Instruction *> instCombineDMB(InstCombiner &IC,
+                                                   IntrinsicInst &II) {
+  // If this barrier is post-dominated by identical one we can remove it
+  auto *NI = II.getNextNonDebugInstruction();
+  int LookaheadThreshold = 10;
----------------
paulwalker-arm wrote:

Perhaps worth adding a command line option that defaults to 10 rather than hardwiring it here?

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


More information about the llvm-commits mailing list