================
@@ -0,0 +1,51 @@
+// RUN: %clang_cc1 -gkey-instructions -x c++ -std=c++17 %s 
-debug-info-kind=line-tables-only -emit-llvm -o - \
+// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not 
atomRank --check-prefixes=CHECK,CHECK-CXX
+
+// RUN: %clang_cc1 -gkey-instructions -x c %s 
-debug-info-kind=line-tables-only -emit-llvm -o - \
+// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not 
atomRank
+
+int g;
+void a(int A, int B) {
+// CHECK: entry:
+// The load gets associated with the branch rather than the store.
+// FIXME: Is that the best thing to do?
----------------
jmorse wrote:

Interesting -- I wonder what happens when various bits get optimised away:
 * The switch probably can't be constant-propagated or otherwise affected 
without also messing with the load?
 * The store could be DSE'd quite easily

I feel the least desirable outcome is one where the switch disappears and the 
load gets is_stmt, thus leading to the load and store being steps, on the same 
line. And that seems unlikely to occur given that if the switch can be 
optimised, then the load has already been optimised.

A long way of saying, this is probably alright.

https://github.com/llvm/llvm-project/pull/134643
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to