[llvm-bugs] [Bug 40958] New: [GISEL] Error legalising neon type at -O0 on AArch64.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 4 12:03:03 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40958

            Bug ID: 40958
           Summary: [GISEL] Error legalising neon type at -O0 on AArch64.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: GlobalISel
          Assignee: unassignedbugs at nondot.org
          Reporter: david.green at arm.com
                CC: llvm-bugs at lists.llvm.org, Matthew.Arsenault at amd.com,
                    quentin.colombet at gmail.com

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
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190304/0dd93cbd/attachment.html>


More information about the llvm-bugs mailing list