================
@@ -0,0 +1,58 @@
+// RUN: cir-opt %s -cir-flatten-cfg -o - | FileCheck %s
+
+module {
+  cir.func @foo() {
+    cir.scope {
+      %0 = cir.alloca !cir.int<u, 32>, !cir.ptr<!cir.int<u, 32>>, ["a", init] 
{alignment = 4 : i64}
+      %1 = cir.const #cir.int<4> : !cir.int<u, 32>
+      cir.store %1, %0 : !cir.int<u, 32>, !cir.ptr<!cir.int<u, 32>>
+    }
+    cir.return
+  }
+// CHECK:  cir.func @foo() {
+// CHECK:    cir.br ^bb1
----------------
dkolsen-pgi wrote:

In the patch I am currently working on I am adding the Canonicalization pass, 
which merges/removes useless blocks.  So this CIR will look better after that 
is done.  (At least I think it will. The canonicalization pass runs before the 
flattening pass. I can't promise that it will also run after.)

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

Reply via email to