2019-07-09 17:48:05 +02:00
|
|
|
; RUN: llc -march=mipsel -mattr=+msa,+fp64,+mips32r2 -relocation-model=pic < %s | FileCheck %s
|
2017-04-07 15:31:36 +02:00
|
|
|
|
|
|
|
@llvm_mips_bmnzi_b_ARG1 = global <16 x i8> <i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15, i8 15>, align 16
|
|
|
|
@llvm_mips_bmnzi_b_ARG2 = global <16 x i8> zeroinitializer, align 16
|
|
|
|
@llvm_mips_bmnzi_b_RES = global <16 x i8> zeroinitializer, align 16
|
|
|
|
|
|
|
|
define void @llvm_mips_bmnzi_b_test() nounwind {
|
|
|
|
entry:
|
|
|
|
%0 = load <16 x i8>, <16 x i8>* @llvm_mips_bmnzi_b_ARG1
|
|
|
|
%1 = load <16 x i8>, <16 x i8>* @llvm_mips_bmnzi_b_ARG2
|
|
|
|
%2 = tail call <16 x i8> @llvm.mips.bmnzi.b(<16 x i8> %0, <16 x i8> %1, i32 240)
|
Elide stores which are overwritten without being observed.
Summary:
In SelectionDAG, when a store is immediately chained to another store
to the same address, elide the first store as it has no observable
effects. This is causes small improvements dealing with intrinsics
lowered to stores.
Test notes:
* Many testcases overwrite store addresses multiple times and needed
minor changes, mainly making stores volatile to prevent the
optimization from optimizing the test away.
* Many X86 test cases optimized out instructions associated with
associated with va_start.
* Note that test_splat in CodeGen/AArch64/misched-stp.ll no longer has
dependencies to check and can probably be removed and potentially
replaced with another test.
Reviewers: rnk, john.brawn
Subscribers: aemerson, rengolin, qcolombet, jyknight, nemanjai, nhaehnle, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D33206
llvm-svn: 303198
2017-05-16 21:43:56 +02:00
|
|
|
store volatile <16 x i8> %2, <16 x i8>* @llvm_mips_bmnzi_b_RES
|
2017-04-07 15:31:36 +02:00
|
|
|
%3 = tail call <16 x i8> @llvm.mips.bmnzi.b(<16 x i8> %0, <16 x i8> %1, i32 15)
|
Elide stores which are overwritten without being observed.
Summary:
In SelectionDAG, when a store is immediately chained to another store
to the same address, elide the first store as it has no observable
effects. This is causes small improvements dealing with intrinsics
lowered to stores.
Test notes:
* Many testcases overwrite store addresses multiple times and needed
minor changes, mainly making stores volatile to prevent the
optimization from optimizing the test away.
* Many X86 test cases optimized out instructions associated with
associated with va_start.
* Note that test_splat in CodeGen/AArch64/misched-stp.ll no longer has
dependencies to check and can probably be removed and potentially
replaced with another test.
Reviewers: rnk, john.brawn
Subscribers: aemerson, rengolin, qcolombet, jyknight, nemanjai, nhaehnle, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D33206
llvm-svn: 303198
2017-05-16 21:43:56 +02:00
|
|
|
store volatile <16 x i8> %3, <16 x i8>* @llvm_mips_bmnzi_b_RES
|
2017-04-07 15:31:36 +02:00
|
|
|
%4 = tail call <16 x i8> @llvm.mips.bmnzi.b(<16 x i8> %0, <16 x i8> %1, i32 170)
|
|
|
|
store <16 x i8> %4, <16 x i8>* @llvm_mips_bmnzi_b_RES
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
; CHECK-LABEL: llvm_mips_bmnzi_b_test:
|
|
|
|
; CHECK: lw [[R0:\$[0-9]+]], %got(llvm_mips_bmnzi_b_RES)(
|
|
|
|
; CHECK: lw [[R1:\$[0-9]+]], %got(llvm_mips_bmnzi_b_ARG1)(
|
|
|
|
; CHECK: lw [[R2:\$[0-9]+]], %got(llvm_mips_bmnzi_b_ARG2)(
|
|
|
|
; CHECK: ld.b [[R3:\$w[0-9]+]], 0([[R2]])
|
|
|
|
; CHECK: ld.b [[R4:\$w[0-9]+]], 0([[R1]])
|
|
|
|
; CHECK: move.v [[R5:\$w[0-9]+]], [[R4]]
|
|
|
|
; CHECK: binsli.b [[R5]], [[R3]], 3
|
|
|
|
; CHECK: binsri.b [[R5]], [[R3]], 3
|
|
|
|
; CHECK: bmnzi.b [[R4]], [[R3]], 170
|
|
|
|
|
|
|
|
define void @llvm_mips_bmzi_b_test() nounwind {
|
|
|
|
entry:
|
|
|
|
%0 = load <16 x i8>, <16 x i8>* @llvm_mips_bmnzi_b_ARG1
|
|
|
|
%1 = load <16 x i8>, <16 x i8>* @llvm_mips_bmnzi_b_ARG2
|
|
|
|
%2 = tail call <16 x i8> @llvm.mips.bmzi.b(<16 x i8> %0, <16 x i8> %1, i32 240)
|
Elide stores which are overwritten without being observed.
Summary:
In SelectionDAG, when a store is immediately chained to another store
to the same address, elide the first store as it has no observable
effects. This is causes small improvements dealing with intrinsics
lowered to stores.
Test notes:
* Many testcases overwrite store addresses multiple times and needed
minor changes, mainly making stores volatile to prevent the
optimization from optimizing the test away.
* Many X86 test cases optimized out instructions associated with
associated with va_start.
* Note that test_splat in CodeGen/AArch64/misched-stp.ll no longer has
dependencies to check and can probably be removed and potentially
replaced with another test.
Reviewers: rnk, john.brawn
Subscribers: aemerson, rengolin, qcolombet, jyknight, nemanjai, nhaehnle, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D33206
llvm-svn: 303198
2017-05-16 21:43:56 +02:00
|
|
|
store volatile <16 x i8> %2, <16 x i8>* @llvm_mips_bmnzi_b_RES
|
2017-04-07 15:31:36 +02:00
|
|
|
%3 = tail call <16 x i8> @llvm.mips.bmzi.b(<16 x i8> %0, <16 x i8> %1, i32 15)
|
Elide stores which are overwritten without being observed.
Summary:
In SelectionDAG, when a store is immediately chained to another store
to the same address, elide the first store as it has no observable
effects. This is causes small improvements dealing with intrinsics
lowered to stores.
Test notes:
* Many testcases overwrite store addresses multiple times and needed
minor changes, mainly making stores volatile to prevent the
optimization from optimizing the test away.
* Many X86 test cases optimized out instructions associated with
associated with va_start.
* Note that test_splat in CodeGen/AArch64/misched-stp.ll no longer has
dependencies to check and can probably be removed and potentially
replaced with another test.
Reviewers: rnk, john.brawn
Subscribers: aemerson, rengolin, qcolombet, jyknight, nemanjai, nhaehnle, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D33206
llvm-svn: 303198
2017-05-16 21:43:56 +02:00
|
|
|
store volatile <16 x i8> %3, <16 x i8>* @llvm_mips_bmnzi_b_RES
|
2017-04-07 15:31:36 +02:00
|
|
|
%4 = tail call <16 x i8> @llvm.mips.bmzi.b(<16 x i8> %0, <16 x i8> %1, i32 170)
|
|
|
|
store <16 x i8> %4, <16 x i8>* @llvm_mips_bmnzi_b_RES
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
; CHECK-LABEL: llvm_mips_bmzi_b_test:
|
|
|
|
; CHECK: lw [[R0:\$[0-9]+]], %got(llvm_mips_bmnzi_b_RES)(
|
|
|
|
; CHECK: lw [[R1:\$[0-9]+]], %got(llvm_mips_bmnzi_b_ARG2)(
|
|
|
|
; CHECK: lw [[R2:\$[0-9]+]], %got(llvm_mips_bmnzi_b_ARG1)(
|
|
|
|
; CHECK: ld.b [[R3:\$w[0-9]+]], 0([[R2]])
|
|
|
|
; CHECK: ld.b [[R4:\$w[0-9]+]], 0([[R1]])
|
|
|
|
; CHECK: move.v [[R5:\$w[0-9]+]], [[R4]]
|
|
|
|
; CHECK: binsli.b [[R5]], [[R3]], 3
|
|
|
|
; CHECK: binsri.b [[R5]], [[R3]], 3
|
|
|
|
; bmnzi.b is the same as bmzi.b with ws and wd_in swapped
|
|
|
|
; CHECK: bmnzi.b [[R4]], [[R3]], 170
|
|
|
|
|
|
|
|
declare <16 x i8> @llvm.mips.bmnzi.b(<16 x i8>, <16 x i8>, i32) nounwind
|
|
|
|
declare <16 x i8> @llvm.mips.bmzi.b(<16 x i8>, <16 x i8>, i32) nounwind
|