[llvm] Do not treat llvm.fake.use as a debug instruction (PR #128684)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 01:55:13 PST 2025
================
@@ -0,0 +1,67 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -p="simplifycfg<sink-common-insts>" -S < %s | FileCheck %s
+
+;; Verify that fake uses are not ignored when sinking instructions in
+;; SimplifyCFG; when a fake use appears in only one incoming block they prevent
+;; further sinking, and when identical fake uses appear on both sides they
+;; are sunk normally.
----------------
OCHyams wrote:
Seems a bit fuzzy to me whether fake.use should block this optimisation or ignore the intrinsics and sink them into the suc. I don't find the [docs](https://llvm.org/docs/LangRef.html#id1872) particularly clarifying for this specific case.
You've been close to this work and have upstreamed it, so this is less me contesting the correct behaviour, more hoping for a bit more of rationale/explanation?
https://github.com/llvm/llvm-project/pull/128684
More information about the llvm-commits
mailing list