Issue 132491
Summary [CIR] Upstream support for switch statements
Labels new issue
Assignees
Reporter andykaylor
    ### Overview
Upstream support for switch statements and the cir.switch and cir.case operations.

### Suggested minimal test case
```
int f(int a) {
  switch (a) {
    case 0: return 10;
    case 1: return 20;
    default: return 30;
  }
}
```

Note: The cir.break statement will be upstreamed as part of https://github.com/llvm/llvm-project/issues/132490. Please wait for that to avoid duplicate work. The upstreaming of switch statements without break statements can be handled independently.

### Existing incubator tests
clang/test/CIR/CodeGen/switch.cpp

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to