[PATCH] D128224: [DSE] Don't remove nounwind invokes

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 00:34:04 PDT 2022


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LG



================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1019
+      if (isa<InvokeInst>(CB))
+        return false;
+
----------------
I'd probably go for a `CB->isTerminator()` check here, rather than checking specifically for invokes (though i doubt this can happen with `callbr` in practice).


================
Comment at: llvm/test/Transforms/DeadStoreElimination/nounwind-invoke.ll:1
+; RUN: opt -dse -S < %s | FileCheck %s
+
----------------
Please always use update_test_checks.py for middle-end tests.


================
Comment at: llvm/test/Transforms/DeadStoreElimination/nounwind-invoke.ll:4
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
----------------
Datalayout and triple are likely not relevant.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128224/new/

https://reviews.llvm.org/D128224



More information about the llvm-commits mailing list