1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: sed 's/iX/i32/g' %s | llc --mtriple=wasm32-unknown-unknown | FileCheck --check-prefix=I32 %s
3 ; RUN: sed 's/iX/i64/g' %s | llc --mtriple=wasm64-unknown-unknown | FileCheck --check-prefix=I64 %s
5 declare iX @llvm.fshl.iX(iX, iX, iX)
6 declare iX @llvm.fshr.iX(iX, iX, iX)
8 ; from https://github.com/llvm/llvm-project/issues/62703
10 define iX @testLeft(iX noundef %0, iX noundef %1) {
11 ; I32-LABEL: testLeft:
12 ; I32: .functype testLeft (i32, i32) -> (i32)
14 ; I32-NEXT: local.get 0
15 ; I32-NEXT: local.get 1
17 ; I32-NEXT: # fallthrough-return
19 ; I64-LABEL: testLeft:
20 ; I64: .functype testLeft (i64, i64) -> (i64)
22 ; I64-NEXT: local.get 0
23 ; I64-NEXT: local.get 1
25 ; I64-NEXT: # fallthrough-return
26 %3 = call iX @llvm.fshl.iX(iX %0, iX %0, iX %1)
30 define iX @testRight(iX noundef %0, iX noundef %1) {
31 ; I32-LABEL: testRight:
32 ; I32: .functype testRight (i32, i32) -> (i32)
34 ; I32-NEXT: local.get 0
35 ; I32-NEXT: local.get 1
37 ; I32-NEXT: # fallthrough-return
39 ; I64-LABEL: testRight:
40 ; I64: .functype testRight (i64, i64) -> (i64)
42 ; I64-NEXT: local.get 0
43 ; I64-NEXT: local.get 1
45 ; I64-NEXT: # fallthrough-return
46 %3 = call iX @llvm.fshr.iX(iX %0, iX %0, iX %1)