1*85e4ee15SJosh Stone; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 2 2*85e4ee15SJosh Stone; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output < %s | FileCheck %s 3*85e4ee15SJosh Stone; 4*85e4ee15SJosh Stone; Check that SystemZTTIImpl::getMemoryOpCost doesn't try to legalize structs, 5*85e4ee15SJosh Stone; which was failing llvm_unreachable in MVT::getVT. 6*85e4ee15SJosh Stone 7*85e4ee15SJosh Stonetarget datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64" 8*85e4ee15SJosh Stonetarget triple = "s390x-unknown-linux-gnu" 9*85e4ee15SJosh Stone 10*85e4ee15SJosh Stonedeclare { i64, i32 } @bar() 11*85e4ee15SJosh Stone 12*85e4ee15SJosh Stonedefine i8 @foo() { 13*85e4ee15SJosh Stone; CHECK-LABEL: 'foo' 14*85e4ee15SJosh Stone; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %1 15*85e4ee15SJosh Stone; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = call { i64, i32 } @bar() 16*85e4ee15SJosh Stone; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store { i64, i32 } %2, ptr inttoptr (i64 16 to ptr), align 16 17*85e4ee15SJosh Stone; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: br label %1 18*85e4ee15SJosh Stone; 19*85e4ee15SJosh Stone br label %1 20*85e4ee15SJosh Stone 21*85e4ee15SJosh Stone1: ; preds = %1, %0 22*85e4ee15SJosh Stone %2 = call { i64, i32 } @bar() 23*85e4ee15SJosh Stone store { i64, i32 } %2, ptr inttoptr (i64 16 to ptr), align 16 24*85e4ee15SJosh Stone br label %1 25*85e4ee15SJosh Stone} 26