[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon May 5 11:57:37 PDT 2025
================
@@ -112,24 +141,31 @@ int sw4(int a) {
// CIR-NEXT: }
// CIR-NEXT: cir.yield
// CIR-NEXT: }
+// CIR-NEXT: cir.case(default, []) {
+// CIR-NEXT: %5 = cir.const #cir.int<2> : !s32i
+// CIR-NEXT: cir.store %5, %1 : !s32i, !cir.ptr<!s32i>
+// CIR-NEXT: %6 = cir.load %1 : !cir.ptr<!s32i>, !s32i
+// CIR-NEXT: cir.return %6 : !s32i
+// CIR-NEXT: }
+// CIR-NEXT: cir.yield
+// CIR-NEXT: }
----------------
andykaylor wrote:
Is the indentation level wrong here? This yield is terminating the `cir.switch` on line 134, right?
https://github.com/llvm/llvm-project/pull/138003
More information about the cfe-commits
mailing list