[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

Morris Hafner via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 12 14:20:40 PDT 2025


================
@@ -78,6 +78,111 @@ class LLVMLoweringInfo {
 class CIR_Op<string mnemonic, list<Trait> traits = []> :
     Op<CIR_Dialect, mnemonic, traits>, LLVMLoweringInfo;
 
+//===----------------------------------------------------------------------===//
+// CastOp
+//===----------------------------------------------------------------------===//
+
+// The enumaration value isn't in sync with clang.
----------------
mmha wrote:

I tried to get the enums in sync. Good news is I found a couple of unused casting kinds wrt. complex numbers which I removed. Bad news is I found one casting kind (bool to float) that's specific to CIR: llvm/clangir#290. I moved it to the bottom on the list so the enum values of classic CG and CIR match up.

https://github.com/llvm/llvm-project/pull/130690


More information about the cfe-commits mailing list