This reverts commit 11afbf396e10e1b1e91a5991e2aec1916e29a910. There are 10 tests still failing after follow-up fix b5d0bf9b9853, this should get the following bots back to green: - https://lab.llvm.org/buildbot/#/builders/183/builds/8194 - https://lab.llvm.org/buildbot/#/builders/186/builds/9491 - https://lab.llvm.org/buildbot/#/builders/214/builds/3908 - https://lab.llvm.org/buildbot/#/builders/93/builds/11740 - https://lab.llvm.org/buildbot/#/builders/231/builds/4200 - https://lab.llvm.org/buildbot/#/builders/121/builds/24519 - https://lab.llvm.org/buildbot/#/builders/230/builds/4466 - https://lab.llvm.org/buildbot/#/builders/94/builds/11639 - https://lab.llvm.org/buildbot/#/builders/45/builds/9325 - https://lab.llvm.org/buildbot/#/builders/124/builds/5219 - https://lab.llvm.org/buildbot/#/builders/67/builds/8623 - https://lab.llvm.org/buildbot/#/builders/123/builds/13836 - https://lab.llvm.org/buildbot/#/builders/109/builds/49355 - https://lab.llvm.org/buildbot/#/builders/58/builds/27751 - https://lab.llvm.org/buildbot/#/builders/117/builds/9922 - https://lab.llvm.org/buildbot/#/builders/16/builds/37012 - https://lab.llvm.org/buildbot/#/builders/104/builds/9490 - https://lab.llvm.org/buildbot/#/builders/42/builds/7725 - https://lab.llvm.org/buildbot/#/builders/196/builds/20077 - https://lab.llvm.org/buildbot/#/builders/3/builds/15217 - https://lab.llvm.org/buildbot/#/builders/6/builds/15251 - https://lab.llvm.org/buildbot/#/builders/9/builds/15247 - https://lab.llvm.org/buildbot/#/builders/36/builds/26487 - https://lab.llvm.org/buildbot/#/builders/54/builds/2474 - https://lab.llvm.org/buildbot/#/builders/74/builds/14536 - https://lab.llvm.org/buildbot/#/builders/5/builds/28555
62 lines
1.6 KiB
LLVM
62 lines
1.6 KiB
LLVM
; RUN: llc < %s -asm-verbose=false -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s
|
|
|
|
; Test various types and operators that need to be legalized.
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
; CHECK-LABEL: shl_i3:
|
|
; CHECK: i32.const $push0=, 7{{$}}
|
|
; CHECK: i32.and $push1=, $1, $pop0{{$}}
|
|
; CHECK: i32.shl $push2=, $0, $pop1{{$}}
|
|
define i3 @shl_i3(i3 %a, i3 %b, i3* %p) {
|
|
%t = shl i3 %a, %b
|
|
ret i3 %t
|
|
}
|
|
|
|
; CHECK-LABEL: shl_i53:
|
|
; CHECK: i64.const $push0=, 9007199254740991{{$}}
|
|
; CHECK: i64.and $push1=, $1, $pop0{{$}}
|
|
; CHECK: i64.shl $push2=, $0, $pop1{{$}}
|
|
define i53 @shl_i53(i53 %a, i53 %b, i53* %p) {
|
|
%t = shl i53 %a, %b
|
|
ret i53 %t
|
|
}
|
|
|
|
; CHECK-LABEL: sext_in_reg_i32_i64:
|
|
; CHECK: i64.shl
|
|
; CHECK: i64.shr_s
|
|
define i64 @sext_in_reg_i32_i64(i64 %a) {
|
|
%b = shl i64 %a, 32
|
|
%c = ashr i64 %b, 32
|
|
ret i64 %c
|
|
}
|
|
|
|
; CHECK-LABEL: fpext_f32_f64:
|
|
; CHECK: f32.load $push0=, 0($0){{$}}
|
|
; CHECK: f64.promote_f32 $push1=, $pop0{{$}}
|
|
; CHECK: return $pop1{{$}}
|
|
define double @fpext_f32_f64(float *%p) {
|
|
%v = load float, float* %p
|
|
%e = fpext float %v to double
|
|
ret double %e
|
|
}
|
|
|
|
; CHECK-LABEL: fpconv_f64_f32:
|
|
; CHECK: f64.load $push0=, 0($0){{$}}
|
|
; CHECK: f32.demote_f64 $push1=, $pop0{{$}}
|
|
; CHECK: return $pop1{{$}}
|
|
define float @fpconv_f64_f32(double *%p) {
|
|
%v = load double, double* %p
|
|
%e = fptrunc double %v to float
|
|
ret float %e
|
|
}
|
|
|
|
; Check that big shifts work. This generates a big pile of code from the
|
|
; legalizer; the main thing here is that we don't abort.
|
|
|
|
; CHECK-LABEL: bigshift:
|
|
define i1024 @bigshift(i1024 %a, i1024 %b) {
|
|
%c = shl i1024 %a, %b
|
|
ret i1024 %c
|
|
}
|