| 1 |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 |
; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp -enable-arm-maskedldst %s -o - | FileCheck %s |
| 3 |
|
| 4 |
; This files has some unused gathers, making sure that they do not cause |
| 5 |
; problems as the function gets simplified. |
| 6 |
|
| 7 |
define arm_aapcs_vfpcc void @unused1(<4 x ptr> %offs) { |
| 8 |
; CHECK-LABEL: unused1: |
| 9 |
; CHECK: @ %bb.0: @ %entry |
| 10 |
; CHECK-NEXT: bx lr |
| 11 |
entry: |
| 12 |
%gather = call <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr> %offs, i32 4, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i32> undef) |
| 13 |
ret void |
| 14 |
} |
| 15 |
|
| 16 |
define arm_aapcs_vfpcc void @unused2(<4 x ptr> %offs) { |
| 17 |
; CHECK-LABEL: unused2: |
| 18 |
; CHECK: @ %bb.0: @ %entry |
| 19 |
; CHECK-NEXT: bx lr |
| 20 |
entry: |
| 21 |
%gather1 = call <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr> %offs, i32 4, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i32> undef) |
| 22 |
%gather2 = call <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr> %offs, i32 4, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i32> undef) |
| 23 |
ret void |
| 24 |
} |
| 25 |
|
| 26 |
define arm_aapcs_vfpcc void @unused2_used(<4 x ptr> %offs) { |
| 27 |
; CHECK-LABEL: unused2_used: |
| 28 |
; CHECK: @ %bb.0: @ %entry |
| 29 |
; CHECK-NEXT: bx lr |
| 30 |
entry: |
| 31 |
%gather1 = call <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr> %offs, i32 4, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i32> undef) |
| 32 |
%gather2 = call <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr> %offs, i32 4, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i32> undef) |
| 33 |
%unused = add <4 x i32> %gather1, %gather2 |
| 34 |
ret void |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
declare <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr>, i32, <4 x i1>, <4 x i32>) |