[GISEL] Error legalising neon type at -O0 on AArch64.
| Bugzilla Link | 40958 |
| Resolution | FIXED |
| Resolved on | Aug 05, 2019 08:19 |
| Version | trunk |
| OS | Linux |
| CC | @arsenm,@qcolombet |
Extended Description
This code: typedef attribute((neon_vector_type(4))) float float32x4_t; typedef struct { float32x4_t b; float32x4_t c; } d; void e() { d f = {0,0}; g(f); }
Fails during legalisation under: clang -O0 -target aarch64-linux-gnu -mcpu=cortex-a57 -c 20150303004327-180.c -mllvm -verify-machineinstrs
With incorrect element types on: %12:(<4 x s32>) = G_BUILD_VECTOR %28:(s64), %30:_(s64)
Without the verify-machineinstrs, it runs into an illegal register copy during reg alloc.
Bisecting this led back to rL353121, but it may be a knock on effect. I don't read global isel debug output very well yet. Perhaps it's the narrowing of the extract that's wrong, not the combining?
The same thing in IR:
; Function Attrs: noinline nounwind optnone define dso_local void @e() #0 { entry: %f = alloca %struct.d, align 16 %0 = bitcast %struct.d* %f to i8* call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 32, i1 false) %1 = bitcast %struct.d* %f to [2 x <4 x float>]* %2 = load [2 x <4 x float>], [2 x <4 x float>]* %1, align 16 %call = call i32 bitcast (i32 (...)* @g to i32 ([2 x <4 x float>])*)([2 x <4 x float>] %2) ret void }
I believe this was fixed. It no longer reproduces, at least.