Lancern wrote: > Which tests cases in the incubator get there? You mentioned call operations, > but those can't currently have nested regions upstream (and I don't think > they will in the future). Was there anything else?
It is this test file in the incubator: https://github.com/llvm/clangir/blob/fd05202710e7ad7dd6b23685374cfe03ccc21da5/clang/test/CIR/CodeGen/non-odr-use-constant.cpp Specifically, this is the single test case that fails: ```cpp int f(int i) { constexpr A a = {1, 2, 3, 4, 5, 6}; return [] (int n, int A::*p) { return (n >= 0 ? a.arr[n] : (n == -1 ? a.*p : a.y[2 - n])); }(i, &A::x); } // CIR: cir.get_global @__const._Z1fi.a // LLVM: getelementptr {{.*}} @__const._Z1fi.a // OGCG: getelementptr inbounds {{.*}} @__const._Z1fi.a ``` In the incubator the call operation to the lambda function contains an empty region for cleanup code. The call operation takes a pointer-to-data-member as its operand, which makes it illegal. No other incubator tests are failing because of nested regions. If the cleanup region for `cir.call` is not yet upstreamed, I think it's find to first leave the nested region handling code behind and put a NYI there. https://github.com/llvm/llvm-project/pull/172133 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
