2016-02-15 16:25:28 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=skx | FileCheck %s --check-prefix=CHECK --check-prefix=SKX
|
|
|
|
|
|
|
|
declare void @f()
|
|
|
|
define <4 x i1> @test_4i1(<4 x i32> %a, <4 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_4i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: pushq %rax
|
|
|
|
; CHECK-NEXT: .cfi_def_cfa_offset 16
|
|
|
|
; CHECK-NEXT: vpcmpnleud %xmm1, %xmm0, %k0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: vpcmpgtd %xmm1, %xmm0, %k1
|
|
|
|
; CHECK-NEXT: korw %k1, %k0, %k0
|
2016-07-18 14:14:39 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, {{[0-9]+}}(%rsp) ## 2-byte Spill
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: callq _f
|
2016-07-18 14:14:39 +08:00
|
|
|
; CHECK-NEXT: kmovw {{[0-9]+}}(%rsp), %k0 ## 2-byte Reload
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: vpmovm2d %k0, %xmm0
|
|
|
|
; CHECK-NEXT: popq %rax
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%cmp_res = icmp ugt <4 x i32> %a, %b
|
|
|
|
%cmp_res2 = icmp sgt <4 x i32> %a, %b
|
|
|
|
call void @f()
|
|
|
|
%res = or <4 x i1> %cmp_res, %cmp_res2
|
|
|
|
ret <4 x i1> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x i1> @test_8i1(<8 x i32> %a, <8 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_8i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: pushq %rax
|
|
|
|
; CHECK-NEXT: .cfi_def_cfa_offset 16
|
|
|
|
; CHECK-NEXT: vpcmpnleud %ymm1, %ymm0, %k0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: vpcmpgtd %ymm1, %ymm0, %k1
|
|
|
|
; CHECK-NEXT: korb %k1, %k0, %k0
|
2016-07-18 14:14:39 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, {{[0-9]+}}(%rsp) ## 2-byte Spill
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-NEXT: vzeroupper
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: callq _f
|
2016-07-18 14:14:39 +08:00
|
|
|
; CHECK-NEXT: kmovw {{[0-9]+}}(%rsp), %k0 ## 2-byte Reload
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: vpmovm2w %k0, %xmm0
|
|
|
|
; CHECK-NEXT: popq %rax
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%cmp_res = icmp ugt <8 x i32> %a, %b
|
|
|
|
%cmp_res2 = icmp sgt <8 x i32> %a, %b
|
|
|
|
call void @f()
|
|
|
|
%res = or <8 x i1> %cmp_res, %cmp_res2
|
|
|
|
ret <8 x i1> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x i1> @test_16i1(<16 x i32> %a, <16 x i32> %b) {
|
|
|
|
; CHECK-LABEL: test_16i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: pushq %rax
|
|
|
|
; CHECK-NEXT: .cfi_def_cfa_offset 16
|
|
|
|
; CHECK-NEXT: vpcmpnleud %zmm1, %zmm0, %k0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: vpcmpgtd %zmm1, %zmm0, %k1
|
|
|
|
; CHECK-NEXT: korw %k1, %k0, %k0
|
2016-07-18 14:14:39 +08:00
|
|
|
; CHECK-NEXT: kmovw %k0, {{[0-9]+}}(%rsp) ## 2-byte Spill
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-NEXT: vzeroupper
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: callq _f
|
2016-07-18 14:14:39 +08:00
|
|
|
; CHECK-NEXT: kmovw {{[0-9]+}}(%rsp), %k0 ## 2-byte Reload
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: vpmovm2b %k0, %xmm0
|
|
|
|
; CHECK-NEXT: popq %rax
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%cmp_res = icmp ugt <16 x i32> %a, %b
|
|
|
|
%cmp_res2 = icmp sgt <16 x i32> %a, %b
|
|
|
|
call void @f()
|
|
|
|
%res = or <16 x i1> %cmp_res, %cmp_res2
|
|
|
|
ret <16 x i1> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <32 x i1> @test_32i1(<32 x i16> %a, <32 x i16> %b) {
|
|
|
|
; CHECK-LABEL: test_32i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: pushq %rax
|
|
|
|
; CHECK-NEXT: .cfi_def_cfa_offset 16
|
|
|
|
; CHECK-NEXT: vpcmpnleuw %zmm1, %zmm0, %k0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: vpcmpgtw %zmm1, %zmm0, %k1
|
|
|
|
; CHECK-NEXT: kord %k1, %k0, %k0
|
2016-07-18 14:14:39 +08:00
|
|
|
; CHECK-NEXT: kmovd %k0, {{[0-9]+}}(%rsp) ## 4-byte Spill
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-NEXT: vzeroupper
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: callq _f
|
2016-07-18 14:14:39 +08:00
|
|
|
; CHECK-NEXT: kmovd {{[0-9]+}}(%rsp), %k0 ## 4-byte Reload
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: vpmovm2b %k0, %ymm0
|
|
|
|
; CHECK-NEXT: popq %rax
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%cmp_res = icmp ugt <32 x i16> %a, %b
|
|
|
|
%cmp_res2 = icmp sgt <32 x i16> %a, %b
|
|
|
|
call void @f()
|
|
|
|
%res = or <32 x i1> %cmp_res, %cmp_res2
|
|
|
|
ret <32 x i1> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <64 x i1> @test_64i1(<64 x i8> %a, <64 x i8> %b) {
|
|
|
|
; CHECK-LABEL: test_64i1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: pushq %rax
|
|
|
|
; CHECK-NEXT: .cfi_def_cfa_offset 16
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: vpcmpnleub %zmm1, %zmm0, %k0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: vpcmpgtb %zmm1, %zmm0, %k1
|
|
|
|
; CHECK-NEXT: korq %k1, %k0, %k0
|
|
|
|
; CHECK-NEXT: kmovq %k0, (%rsp) ## 8-byte Spill
|
2017-03-03 17:03:24 +08:00
|
|
|
; CHECK-NEXT: vzeroupper
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: callq _f
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: kmovq (%rsp), %k0 ## 8-byte Reload
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: vpmovm2b %k0, %zmm0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: popq %rax
|
2016-02-15 16:25:28 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%cmp_res = icmp ugt <64 x i8> %a, %b
|
|
|
|
%cmp_res2 = icmp sgt <64 x i8> %a, %b
|
|
|
|
call void @f()
|
|
|
|
%res = or <64 x i1> %cmp_res, %cmp_res2
|
|
|
|
ret <64 x i1> %res
|
|
|
|
}
|