Codegen emits non-bool cir.cmp
operations
#1108
Labels
IR difference
A difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests
When looking at some C generated code I noticed that most
cir.cmp
operations that were generated were of types32i
, and then immediately converted to bool before used in if statements etc.I found the root cause in CIRGenScalarExpr, will publish a fix over the coming week that simplifies the generated code for most cases.
———
I will note that a lot of tests rely on 1:1 generated CIR/LLVMIR, even without using file check variables, which makes such changes a lot harder than they could have been! For example, tests of lowering of complicated scopes and control flow should not check for the way that conditions are evaluated.
The text was updated successfully, but these errors were encountered: