[llvm-bugs] [Bug 38841] New: segmentation fault for llvm.experimenta.vector.reduce.and intrinsics of <N x i1>

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 5 05:47:08 PDT 2018


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

            Bug ID: 38841
           Summary: segmentation fault for
                    llvm.experimenta.vector.reduce.and intrinsics of <N x
                    i1>
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: gonzalobg88 at gmail.com
                CC: llvm-bugs at lists.llvm.org

https://gcc.godbolt.org/z/2-5ggC

These intrinsics are critical for coherent control-flow statements.

This LLVM-IR: 

declare i1 @llvm.experimental.vector.reduce.and.v32i1(<32 x i1>);
declare i1 @llvm.experimental.vector.reduce.and.v8i1(<8 x i1>);
declare i1 @llvm.experimental.vector.reduce.and.v4i1(<4 x i1>);
declare i1 @llvm.experimental.vector.reduce.and.v2i1(<2 x i1>);

define i1 @and128_x2(<2 x i64>) {
    %a = trunc <2 x i64> %0 to <2 x i1>
    %b = call i1 @llvm.experimental.vector.reduce.and.v2i1(<2 x i1> %a)
    ret i1 %b
}

define i1 @and128_x4(<4 x i32>) {
    %a = trunc <4 x i32> %0 to <4 x i1>
    %b = call i1 @llvm.experimental.vector.reduce.and.v4i1(<4 x i1> %a)
    ret i1 %b
}

define i1 @and128_x8(<8 x i8>) {
    %a = trunc <8 x i8> %0 to <8 x i1>
    %b = call i1 @llvm.experimental.vector.reduce.and.v8i1(<8 x i1> %a)
    ret i1 %b
}

define i1 @and256_x4(<4 x i64>) {
    %a = trunc <4 x i64> %0 to <4 x i1>
    %b = call i1 @llvm.experimental.vector.reduce.and.v4i1(<4 x i1> %a)
    ret i1 %b
}

define i1 @and256_x8(<8 x i32>) {
    %a = trunc <8 x i32> %0 to <8 x i1>
    %b = call i1 @llvm.experimental.vector.reduce.and.v8i1(<8 x i1> %a)
    ret i1 %b
}
define i1 @and256_x32(<32 x i8>) {
    %a = trunc <32 x i8> %0 to <32 x i1>
    %b = call i1 @llvm.experimental.vector.reduce.and.v32i1(<32 x i1> %a)
    ret i1 %b
}

produces a segmentation fault:

Stack dump:

0.      Program arguments: /opt/compiler-explorer/clang-trunk/bin/llc -o
/tmp/compiler-explorer-compiler11885-54-18ogzje.tf3t/output.s -march=aarch64
<source> 

1.      Running pass 'Function Pass Manager' on module '<source>'.

2.      Running pass 'AArch64 Instruction Selection' on function '@and128_x2'

/compiler-explorer/c-preload/compiler-wrapper: line 21: 22617 Segmentation
fault      (core dumped) "$@"

Compiler returned: 139

-- 
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/20180905/59eaffe1/attachment.html>


More information about the llvm-bugs mailing list