[llvm-bugs] [Bug 38519] New: vector IR (insertelement/shufflevector) fails to select for wasm32 with -mattr=+simd128

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 10 05:51:24 PDT 2018


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

            Bug ID: 38519
           Summary: vector IR (insertelement/shufflevector) fails to
                    select for wasm32 with -mattr=+simd128
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedbugs at nondot.org
          Reporter: gonzalobg88 at gmail.com
                CC: llvm-bugs at lists.llvm.org

define hidden void @i8x16_splat(<1 x i128>*, i8 %v) {
start:
%_3.0.vec.insert.i = insertelement <16 x i8> undef, i8 %v, i32 0
%_3.15.vec.insert.i = shufflevector <16 x i8> %_3.0.vec.insert.i, <16 x i8>
undef, <16 x i32> zeroinitializer
%1 = bitcast <16 x i8> %_3.15.vec.insert.i to i128
%_2.sroa.0.0.vec.insert.i = insertelement <1 x i128> undef, i128 %1, i32 0
store <1 x i128> %_2.sroa.0.0.vec.insert.i, <1 x i128>* %0, align 16
ret void
}

compiles fine with `llc -march=wasm32` but produces the following error with
`llc -march=wasm32 -mattr=+simd128` (https://godbolt.org/g/X5dqST): 

LLVM ERROR: Cannot select: 0x5569fcdf5790: ch = store<(store 16 into %ir.0)>
0x5569fcdb6408, 0x5569fcdf55f0, 0x5569fcdf53e8, undef:i32

  0x5569fcdf55f0: v16i8 = BUILD_VECTOR 0x5569fcdf54b8, 0x5569fcdf54b8,
0x5569fcdf54b8, 0x5569fcdf54b8, 0x5569fcdf54b8, 0x5569fcdf54b8, 0x5569fcdf54b8,
0x5569fcdf54b8, 0x5569fcdf54b8, 0x5569fcdf54b8, 0x5569fcdf54b8, 0x5569fcdf54b8,
0x5569fcdf54b8, 0x5569fcdf54b8, 0x5569fcdf54b8, 0x5569fcdf54b8

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

    0x5569fcdf54b8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>

      0x5569fcdf5450: i32 = TargetConstant<1>

  0x5569fcdf53e8: i32 = WebAssemblyISD::ARGUMENT TargetConstant:i32<0>

    0x5569fcdf5380: i32 = TargetConstant<0>

  0x5569fcdf5860: i32 = undef

In function: i8x16_splat

Compiler returned: 1

-- 
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/20180810/d4117131/attachment-0001.html>


More information about the llvm-bugs mailing list