llvm-project
ab9644ac - [CIR] Update CIR unary operations (#201727)

Commit
3 days ago
[CIR] Update CIR unary operations (#201727) This creates a floating-point-specific FNegOp and updates the type constraints on the existing unary operations to match the types that are actually produced by the Clang AST. This change also moves complex types out of the unary operations. A ComplexConjOp is added to handle what was previously being incorrectly referred to as "not", while inc, dec, and minus are just expanded to their component representation during codegen. We may want to consider adding operations like cir.complex.add later, but for now I'm just removing this type from the unary ops. I'm doing this for two reasons: (1) the old use was inconsistent with how we handle other arithmetic operations on complex types, and (2) I will soon need to attach FP-specific attributes to add and subtract of complex types (and so also inc and dec). Assisted-by: Cursor / claude-opus-4.8
Author
Parents
Loading