[PATCH] D49837: [SelectionDAG] Handle unary SelectPatternFlavor for ABS case in SelectionDAGBuilder::visitSelect.

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 17:19:23 PDT 2019


tlively added a comment.

This commit breaks the following IR:

  target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
  target triple = "wasm32-unknown-unknown"
  
  define void @foo() local_unnamed_addr {
  entry:
    %x0 = load <4 x i8>, <4 x i8>* undef, align 1
    %0 = load <4 x i8>, <4 x i8>* null, align 1
    %t6 = srem <4 x i8> %0, %x0
    %1 = ashr <4 x i8> %t6, <i8 7, i8 7, i8 7, i8 7>
    %2 = icmp slt <4 x i8> %x0, zeroinitializer
    %3 = sub <4 x i8> zeroinitializer, %x0
    %4 = select <4 x i1> %2, <4 x i8> %3, <4 x i8> %x0
    %5 = and <4 x i8> %1, %4
    %6 = add <4 x i8> %5, %t6
    store <4 x i8> %6, <4 x i8>* undef, align 1
    ret void
  }

Running llc on that IR gives the following error:

  ScalarizeVectorResult #0: t28: v1i8 = abs t26
  
  LLVM ERROR: Do not know how to scalarize the result of this operator!

This was reported at https://bugs.llvm.org/show_bug.cgi?id=41149.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D49837/new/

https://reviews.llvm.org/D49837





More information about the llvm-commits mailing list