andykaylor wrote:

> I added `break;`s for the builtins that are handled by the piece of code you 
> mentioned, e.g. `__builtin_printf` and the CIR tests pass. If there are 
> regressions in other test suites, wouldn't it be better to handle this 
> explicitly by also inserting `break` for the specific builtin?

Ah. I didn't notice the `break` handling for specific builtins. I just knew 
that we were getting fallback handling for a lot of builtins this way. I didn't 
actually run any tests with your patch applied. The tests I would have used are 
the single-source and multi-source tests from the LLVM test suite.

Inserting `break` for specific builtins is a reasonable way to handle this. The 
block of code that currently maps these to library functions will stay in place 
long term, but with an additional condition (`shouldEmitBuiltinAsIR`). When we 
add that condition, that should flag builtins that we're missing.

https://github.com/llvm/llvm-project/pull/168699
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to