Open gauss11 opened 1 year ago
The bug is caused by SROA and related passes making unsafe assumptions about bitcasting, which is a gnarly problem and we'll have to look into. With asserts enabled the following error message is produced:
expected struct bitcast to only be used by lifetime intrinsicsAssertion failed: (false && "expected struct bitcast to only be used by lifetime intrinsics"), function RewriteBitCast, file ScalarReplAggregatesHLSL.cpp, line 2548.
HLSL compilers 5.1 and lower compiles this test without any type-cast errors. DXC returns error: // Internal Compiler error: llvm::cast() argument of incompatible type!
run dxc -T vs_6_0 test.hlsl
=========== test.hlsl ============