brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 8735a66 Raw
48 lines · plain
1; Check that llc does not abort, which happened due to incorrect MIR.2; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=1 < %s3; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=2 < %s4; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=3 < %s5; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=4 < %s6; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=5 < %s7 8; Look for this symptom, in case llc does not check invalid IR.9; CHECK-NOT: insert(%14,%5,#5,#5)10 11; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=1 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s12; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=2 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s13; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=3 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s14; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=4 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s15; RUN: llc -O2 -mtriple=hexagon -insert-max-ifmap=5 -debug-only=hexinsert -stop-after hexinsert < %s 2>&1 | FileCheck %s16 17; REQUIRES: asserts18 19define i32 @f(i32 %0, i32 %1, i32 %2) {20entry:21  switch i32 %0, label %common.ret1 [22    i32 8907, label %323    i32 4115, label %624  ]25 26common.ret1:27  %common.ret1.op = phi i32 [ %5, %3 ], [ %526, %6 ], [ 0, %entry ]28  ret i32 %common.ret1.op29 303:31  %4 = shl i32 %2, 532  %5 = and i32 %4, 99233  br label %common.ret134 356:36  %7 = shl i32 %0, 1037  %8 = and i32 %7, 716838  %9 = shl i32 %0, 539  %10 = and i32 %9, 99240  %11 = or i32 %10, %841  %12 = and i32 %0, 142  %13 = or i32 %11, %1243  %14 = shl i32 %1, 144  %15 = and i32 %14, 203161645  %526 = or i32 %13, %1546  br label %common.ret147}48