blob: 4bfec212cf769d134db079164d0cdfba8c2ff0ae [file] [log] [blame]
Dan Gohmana8483752015-12-10 00:26:26 +00001; RUN: llc < %s -asm-verbose=false | FileCheck %s
2
3; Test various types and operators that need to be legalized.
4
5target datalayout = "e-p:32:32-i64:64-n32:64-S128"
6target triple = "wasm32-unknown-unknown"
7
8; CHECK-LABEL: shl_i3:
9; CHECK: i32.const $push0=, 7
10; CHECK: i32.and $push1=, $1, $pop0
11; CHECK: i32.shl $push2=, $0, $pop1
12define i3 @shl_i3(i3 %a, i3 %b, i3* %p) {
13 %t = shl i3 %a, %b
14 ret i3 %t
15}
16
17; CHECK-LABEL: shl_i53:
18; CHECK: i64.const $push0=, 9007199254740991
19; CHECK: i64.and $push1=, $1, $pop0
20; CHECK: i64.shl $push2=, $0, $pop1
21define i53 @shl_i53(i53 %a, i53 %b, i53* %p) {
22 %t = shl i53 %a, %b
23 ret i53 %t
24}