[clang] [CIR][CIRGen] Upstream support for `__builtin_bcopy` (PR #185038)
Ayokunle Amodu via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 6 08:51:58 PST 2026
ayokunle321 wrote:
@andykaylor for some reason, when i tired to add this [test](https://github.com/llvm/clangir/blob/63412d47b3d573ba2d7d55920541269930d4a303/clang/test/CIR/CodeGen/builtin-bcopy.cpp#L34-L49) it crashed with `Assertion failed: (mightHaveTerminator()), function getTerminator, file Block.cpp, line 250`. Any clue as to why? It's similar to the other tests.
I thought it had to do with the funky return but I tried this
```mlir
void test_conditional_bcopy(void) {
char dst[20];
char src[20];
int _sz = 20, len = 20;
if (_sz)
(_sz >= len) ? __builtin_bcopy(src, dst, len) : foo();
else
__builtin_bcopy(src, dst, len);
}
```
and it still crashed.
And should this be reviewed and merged first before making an issue about the crash? Or it should be sorted out in this PR?
https://github.com/llvm/llvm-project/pull/185038
More information about the cfe-commits
mailing list