Skip to content

Commit f78b9a3

Browse files
committed
[Hexagon] Add fshl/fshr -> combine() tests identified in D75114
Added tests showing that the fshl/fshr -> combine() is working the wrong way around
1 parent 1c82dd3 commit f78b9a3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

llvm/test/CodeGen/Hexagon/funnel-shift.ll

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,22 @@ b0:
256256
ret i64 %v0
257257
}
258258

259+
; CHECK-LABEL: f30:
260+
; CHECK: r[[R00:[0-9]+]] = combine(r0.h,r1.l)
261+
define i32 @f30(i32 %a0, i32 %a1) #1 {
262+
b0:
263+
%v0 = tail call i32 @llvm.fshl.i32(i32 %a0, i32 %a1, i32 16)
264+
ret i32 %v0
265+
}
266+
267+
; CHECK-LABEL: f31:
268+
; CHECK: r[[R00:[0-9]+]] = combine(r0.h,r1.l)
269+
define i32 @f31(i32 %a0, i32 %a1) #1 {
270+
b0:
271+
%v0 = tail call i32 @llvm.fshr.i32(i32 %a0, i32 %a1, i32 16)
272+
ret i32 %v0
273+
}
274+
259275
declare i32 @llvm.fshl.i32(i32, i32, i32) #0
260276
declare i32 @llvm.fshr.i32(i32, i32, i32) #0
261277
declare i64 @llvm.fshl.i64(i64, i64, i64) #0

0 commit comments

Comments
 (0)