================
@@ -16,13 +16,21 @@ void f2(void) {
   f1(s);
 }
 
+// S is one eightbyte of INTEGER class, so it is passed as one i64.
 // CIR-LABEL: cir.func{{.*}} @f2(){{.*}} {
+// CIR:         %[[COERCE:.+]] = cir.alloca "coerce" align(8) : 
!cir.ptr<!rec_S>
 // CIR:         %[[S:.+]] = cir.load align(4) %{{.+}} : !cir.ptr<!rec_S>, 
!rec_S
-// CIR-NEXT:    cir.call @f1(%[[S]]) : (!rec_S) -> ()
+// CIR-NEXT:    cir.store %[[S]], %[[COERCE]] : !rec_S, !cir.ptr<!rec_S>
+// CIR-NEXT:    %[[CAST:.+]] = cir.cast bitcast %[[COERCE]] : !cir.ptr<!rec_S> 
-> !cir.ptr<!u64i>
+// CIR-NEXT:    %[[ARG:.+]] = cir.load %[[CAST]] : !cir.ptr<!u64i>, !u64i
+// CIR-NEXT:    cir.call @f1(%[[ARG]]) : (!u64i) -> ()
 
 // LLVM-LABEL: define{{.*}} void @f2(){{.*}}
+// LLVM:         %[[COERCE:.+]] = alloca %struct.S, i64 1, align 8
----------------
andykaylor wrote:

This is checking a lot more detail for LLVM than the checks below do for OGCG.

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

Reply via email to