LLVM: “Invalid bitcast” when converting a struct to identical struct
问题 I'm working on fixing some bugs in TinyGo compiler. At the moment, I have a weird problems with bitcasting. The IR code would be as follows: %structcast.go.A = type { i32, i32, i32, i32 } %structcast.go.B = type { i32, i32, i32, i32 } ... %0 = load %structcast.go.B, %structcast.go.B* %b, !dbg !1851 %changetype = bitcast %structcast.go.B %0 to %structcast.go.A, !dbg !1852 call void @structcast.go.foo(%structcast.go.A %changetype, i8* undef, i8* undef), !dbg !1853 But during IR verification I