diff --git a/llvm/test/Analysis/CostModel/X86/arith-costkinds.ll b/llvm/test/Analysis/CostModel/X86/arith-costkinds.ll new file mode 100644 index 0000000000000..bfc4e5a1cbe3b --- /dev/null +++ b/llvm/test/Analysis/CostModel/X86/arith-costkinds.ll @@ -0,0 +1,629 @@ +; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+sse2 -cost-kind=latency < %s | FileCheck %s --check-prefixes=LATE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+sse2 -cost-kind=code-size < %s | FileCheck %s --check-prefixes=SIZE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+sse2 -cost-kind=size-latency < %s | FileCheck %s --check-prefixes=SIZE_LATE +; +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx -cost-kind=latency < %s | FileCheck %s --check-prefixes=LATE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx -cost-kind=code-size < %s | FileCheck %s --check-prefixes=SIZE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx -cost-kind=size-latency < %s | FileCheck %s --check-prefixes=SIZE_LATE +; +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx2 -cost-kind=latency < %s | FileCheck %s --check-prefixes=LATE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx2 -cost-kind=code-size < %s | FileCheck %s --check-prefixes=SIZE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx2 -cost-kind=size-latency < %s | FileCheck %s --check-prefixes=SIZE_LATE +; +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx512f,+avx512vl -cost-kind=latency < %s | FileCheck %s --check-prefixes=LATE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx512f,+avx512vl -cost-kind=code-size < %s | FileCheck %s --check-prefixes=SIZE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx512f,+avx512vl -cost-kind=size-latency < %s | FileCheck %s --check-prefixes=SIZE_LATE +; +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx512bw,+avx512vl -cost-kind=latency < %s | FileCheck %s --check-prefixes=LATE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx512bw,+avx512vl -cost-kind=code-size < %s | FileCheck %s --check-prefixes=SIZE +; RUN: opt -mtriple=x86_64-- -passes="print" 2>&1 -disable-output -mattr=+avx512bw,+avx512vl -cost-kind=size-latency < %s | FileCheck %s --check-prefixes=SIZE_LATE + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.8.0" + +define i32 @add(i32 %arg) { +; LATE-LABEL: 'add' +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = add i64 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = add <2 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = add <4 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = add <8 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = add i32 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = add <4 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = add <8 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = add <16 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = add i16 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = add <8 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = add <16 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = add <32 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = add i8 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = add <16 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = add <32 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = add <64 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE-LABEL: 'add' +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = add i64 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = add <2 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = add <4 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = add <8 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = add i32 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = add <4 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = add <8 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = add <16 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = add i16 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = add <8 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = add <16 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = add <32 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = add i8 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = add <16 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = add <32 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = add <64 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE_LATE-LABEL: 'add' +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = add i64 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = add <2 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = add <4 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = add <8 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = add i32 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = add <4 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = add <8 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = add <16 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = add i16 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = add <8 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = add <16 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = add <32 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = add i8 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = add <16 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = add <32 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = add <64 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; + %I64 = add i64 undef, undef + %V2I64 = add <2 x i64> undef, undef + %V4I64 = add <4 x i64> undef, undef + %V8I64 = add <8 x i64> undef, undef + + %I32 = add i32 undef, undef + %V4I32 = add <4 x i32> undef, undef + %V8I32 = add <8 x i32> undef, undef + %V16I32 = add <16 x i32> undef, undef + + %I16 = add i16 undef, undef + %V8I16 = add <8 x i16> undef, undef + %V16I16 = add <16 x i16> undef, undef + %V32I16 = add <32 x i16> undef, undef + + %I8 = add i8 undef, undef + %V16I8 = add <16 x i8> undef, undef + %V32I8 = add <32 x i8> undef, undef + %V64I8 = add <64 x i8> undef, undef + + ret i32 undef +} + +define i32 @sub(i32 %arg) { +; LATE-LABEL: 'sub' +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = sub i64 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = sub <2 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = sub <4 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = sub <8 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = sub i32 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = sub <4 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = sub <8 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = sub <16 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = sub i16 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = sub <8 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = sub <16 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = sub <32 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = sub i8 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = sub <16 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = sub <32 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = sub <64 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE-LABEL: 'sub' +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = sub i64 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = sub <2 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = sub <4 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = sub <8 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = sub i32 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = sub <4 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = sub <8 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = sub <16 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = sub i16 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = sub <8 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = sub <16 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = sub <32 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = sub i8 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = sub <16 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = sub <32 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = sub <64 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE_LATE-LABEL: 'sub' +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = sub i64 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = sub <2 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = sub <4 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = sub <8 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = sub i32 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = sub <4 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = sub <8 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = sub <16 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = sub i16 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = sub <8 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = sub <16 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = sub <32 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = sub i8 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = sub <16 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = sub <32 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = sub <64 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; + %I64 = sub i64 undef, undef + %V2I64 = sub <2 x i64> undef, undef + %V4I64 = sub <4 x i64> undef, undef + %V8I64 = sub <8 x i64> undef, undef + + %I32 = sub i32 undef, undef + %V4I32 = sub <4 x i32> undef, undef + %V8I32 = sub <8 x i32> undef, undef + %V16I32 = sub <16 x i32> undef, undef + + %I16 = sub i16 undef, undef + %V8I16 = sub <8 x i16> undef, undef + %V16I16 = sub <16 x i16> undef, undef + %V32I16 = sub <32 x i16> undef, undef + + %I8 = sub i8 undef, undef + %V16I8 = sub <16 x i8> undef, undef + %V32I8 = sub <32 x i8> undef, undef + %V64I8 = sub <64 x i8> undef, undef + + ret i32 undef +} + +define i32 @or(i32 %arg) { +; LATE-LABEL: 'or' +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = or i64 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = or <2 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = or <4 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = or <8 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = or i32 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = or <4 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = or <8 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = or <16 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = or i16 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = or <8 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = or <16 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = or <32 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = or i8 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = or <16 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = or <32 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = or <64 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I1 = or i1 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I1 = or <2 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I1 = or <4 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I1 = or <8 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I1 = or <16 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I1 = or <32 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I1 = or <64 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE-LABEL: 'or' +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = or i64 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = or <2 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = or <4 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = or <8 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = or i32 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = or <4 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = or <8 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = or <16 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = or i16 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = or <8 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = or <16 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = or <32 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = or i8 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = or <16 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = or <32 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = or <64 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I1 = or i1 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I1 = or <2 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I1 = or <4 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I1 = or <8 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I1 = or <16 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I1 = or <32 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I1 = or <64 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE_LATE-LABEL: 'or' +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = or i64 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = or <2 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = or <4 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = or <8 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = or i32 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = or <4 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = or <8 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = or <16 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = or i16 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = or <8 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = or <16 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = or <32 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = or i8 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = or <16 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = or <32 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = or <64 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I1 = or i1 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I1 = or <2 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I1 = or <4 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I1 = or <8 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I1 = or <16 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I1 = or <32 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I1 = or <64 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; + %I64 = or i64 undef, undef + %V2I64 = or <2 x i64> undef, undef + %V4I64 = or <4 x i64> undef, undef + %V8I64 = or <8 x i64> undef, undef + + %I32 = or i32 undef, undef + %V4I32 = or <4 x i32> undef, undef + %V8I32 = or <8 x i32> undef, undef + %V16I32 = or <16 x i32> undef, undef + + %I16 = or i16 undef, undef + %V8I16 = or <8 x i16> undef, undef + %V16I16 = or <16 x i16> undef, undef + %V32I16 = or <32 x i16> undef, undef + + %I8 = or i8 undef, undef + %V16I8 = or <16 x i8> undef, undef + %V32I8 = or <32 x i8> undef, undef + %V64I8 = or <64 x i8> undef, undef + + %I1 = or i1 undef, undef + %V2I1 = or <2 x i1> undef, undef + %V4I1 = or <4 x i1> undef, undef + %V8I1 = or <8 x i1> undef, undef + %V16I1 = or <16 x i1> undef, undef + %V32I1 = or <32 x i1> undef, undef + %V64I1 = or <64 x i1> undef, undef + + ret i32 undef +} + +define i32 @xor(i32 %arg) { +; LATE-LABEL: 'xor' +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = xor i64 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = xor <2 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = xor <4 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = xor <8 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = xor i32 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = xor <4 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = xor <8 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = xor <16 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = xor i16 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = xor <8 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = xor <16 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = xor <32 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = xor i8 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = xor <16 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = xor <32 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = xor <64 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I1 = xor i1 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I1 = xor <2 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I1 = xor <4 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I1 = xor <8 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I1 = xor <16 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I1 = xor <32 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I1 = xor <64 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE-LABEL: 'xor' +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = xor i64 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = xor <2 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = xor <4 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = xor <8 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = xor i32 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = xor <4 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = xor <8 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = xor <16 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = xor i16 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = xor <8 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = xor <16 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = xor <32 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = xor i8 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = xor <16 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = xor <32 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = xor <64 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I1 = xor i1 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I1 = xor <2 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I1 = xor <4 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I1 = xor <8 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I1 = xor <16 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I1 = xor <32 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I1 = xor <64 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE_LATE-LABEL: 'xor' +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = xor i64 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = xor <2 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = xor <4 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = xor <8 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = xor i32 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = xor <4 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = xor <8 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = xor <16 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = xor i16 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = xor <8 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = xor <16 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = xor <32 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = xor i8 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = xor <16 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = xor <32 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = xor <64 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I1 = xor i1 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I1 = xor <2 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I1 = xor <4 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I1 = xor <8 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I1 = xor <16 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I1 = xor <32 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I1 = xor <64 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; + %I64 = xor i64 undef, undef + %V2I64 = xor <2 x i64> undef, undef + %V4I64 = xor <4 x i64> undef, undef + %V8I64 = xor <8 x i64> undef, undef + + %I32 = xor i32 undef, undef + %V4I32 = xor <4 x i32> undef, undef + %V8I32 = xor <8 x i32> undef, undef + %V16I32 = xor <16 x i32> undef, undef + + %I16 = xor i16 undef, undef + %V8I16 = xor <8 x i16> undef, undef + %V16I16 = xor <16 x i16> undef, undef + %V32I16 = xor <32 x i16> undef, undef + + %I8 = xor i8 undef, undef + %V16I8 = xor <16 x i8> undef, undef + %V32I8 = xor <32 x i8> undef, undef + %V64I8 = xor <64 x i8> undef, undef + + %I1 = xor i1 undef, undef + %V2I1 = xor <2 x i1> undef, undef + %V4I1 = xor <4 x i1> undef, undef + %V8I1 = xor <8 x i1> undef, undef + %V16I1 = xor <16 x i1> undef, undef + %V32I1 = xor <32 x i1> undef, undef + %V64I1 = xor <64 x i1> undef, undef + + ret i32 undef +} + +define i32 @and(i32 %arg) { +; LATE-LABEL: 'and' +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = and i64 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = and <2 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = and <4 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = and <8 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = and i32 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = and <4 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = and <8 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = and <16 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = and i16 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = and <8 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = and <16 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = and <32 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = and i8 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = and <16 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = and <32 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = and <64 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I1 = and i1 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I1 = and <2 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I1 = and <4 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I1 = and <8 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I1 = and <16 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I1 = and <32 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I1 = and <64 x i1> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE-LABEL: 'and' +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = and i64 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = and <2 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = and <4 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = and <8 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = and i32 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = and <4 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = and <8 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = and <16 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = and i16 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = and <8 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = and <16 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = and <32 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = and i8 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = and <16 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = and <32 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = and <64 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I1 = and i1 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I1 = and <2 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I1 = and <4 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I1 = and <8 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I1 = and <16 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I1 = and <32 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I1 = and <64 x i1> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE_LATE-LABEL: 'and' +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = and i64 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = and <2 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = and <4 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = and <8 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = and i32 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = and <4 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = and <8 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = and <16 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = and i16 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = and <8 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = and <16 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = and <32 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = and i8 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = and <16 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = and <32 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = and <64 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I1 = and i1 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I1 = and <2 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I1 = and <4 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I1 = and <8 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I1 = and <16 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I1 = and <32 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I1 = and <64 x i1> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; + %I64 = and i64 undef, undef + %V2I64 = and <2 x i64> undef, undef + %V4I64 = and <4 x i64> undef, undef + %V8I64 = and <8 x i64> undef, undef + + %I32 = and i32 undef, undef + %V4I32 = and <4 x i32> undef, undef + %V8I32 = and <8 x i32> undef, undef + %V16I32 = and <16 x i32> undef, undef + + %I16 = and i16 undef, undef + %V8I16 = and <8 x i16> undef, undef + %V16I16 = and <16 x i16> undef, undef + %V32I16 = and <32 x i16> undef, undef + + %I8 = and i8 undef, undef + %V16I8 = and <16 x i8> undef, undef + %V32I8 = and <32 x i8> undef, undef + %V64I8 = and <64 x i8> undef, undef + + %I1 = and i1 undef, undef + %V2I1 = and <2 x i1> undef, undef + %V4I1 = and <4 x i1> undef, undef + %V8I1 = and <8 x i1> undef, undef + %V16I1 = and <16 x i1> undef, undef + %V32I1 = and <32 x i1> undef, undef + %V64I1 = and <64 x i1> undef, undef + + ret i32 undef +} + +define i32 @mul(i32 %arg) { +; LATE-LABEL: 'mul' +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = mul i64 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = mul <2 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = mul <4 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = mul <8 x i64> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = mul i32 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = mul <4 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = mul <8 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = mul <16 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = mul i16 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = mul <8 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = mul <16 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = mul <32 x i16> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = mul i8 undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I8 = mul <2 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = mul <4 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I8 = mul <8 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = mul <16 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = mul <32 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = mul <64 x i8> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE-LABEL: 'mul' +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = mul i64 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = mul <2 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = mul <4 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = mul <8 x i64> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = mul i32 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = mul <4 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = mul <8 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = mul <16 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = mul i16 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = mul <8 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = mul <16 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = mul <32 x i16> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = mul i8 undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I8 = mul <2 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = mul <4 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I8 = mul <8 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = mul <16 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = mul <32 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = mul <64 x i8> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; +; SIZE_LATE-LABEL: 'mul' +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = mul i64 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I64 = mul <2 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I64 = mul <4 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I64 = mul <8 x i64> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I32 = mul i32 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I32 = mul <4 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I32 = mul <8 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I32 = mul <16 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I16 = mul i16 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I16 = mul <8 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I16 = mul <16 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I16 = mul <32 x i16> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I8 = mul i8 undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V2I8 = mul <2 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V4I8 = mul <4 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V8I8 = mul <8 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V16I8 = mul <16 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V32I8 = mul <32 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V64I8 = mul <64 x i8> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef +; + %I64 = mul i64 undef, undef + %V2I64 = mul <2 x i64> undef, undef + %V4I64 = mul <4 x i64> undef, undef + %V8I64 = mul <8 x i64> undef, undef + + %I32 = mul i32 undef, undef + %V4I32 = mul <4 x i32> undef, undef + %V8I32 = mul <8 x i32> undef, undef + %V16I32 = mul <16 x i32> undef, undef + + %I16 = mul i16 undef, undef + %V8I16 = mul <8 x i16> undef, undef + %V16I16 = mul <16 x i16> undef, undef + %V32I16 = mul <32 x i16> undef, undef + + %I8 = mul i8 undef, undef + %V2I8 = mul <2 x i8> undef, undef + %V4I8 = mul <4 x i8> undef, undef + %V8I8 = mul <8 x i8> undef, undef + %V16I8 = mul <16 x i8> undef, undef + %V32I8 = mul <32 x i8> undef, undef + %V64I8 = mul <64 x i8> undef, undef + + ret i32 undef +} + +; A <2 x i32> gets expanded to a <2 x i64> vector. +; A <2 x i64> vector multiply is implemented using +; 3 PMULUDQ and 2 PADDS and 4 shifts. +define void @mul_2i32() { +; LATE-LABEL: 'mul_2i32' +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A0 = mul <2 x i32> undef, undef +; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; +; SIZE-LABEL: 'mul_2i32' +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A0 = mul <2 x i32> undef, undef +; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; +; SIZE_LATE-LABEL: 'mul_2i32' +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %A0 = mul <2 x i32> undef, undef +; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void +; + %A0 = mul <2 x i32> undef, undef + + ret void +}