blob: a164f7047b5cc2e9460c7eb60d4742dea13a6580 [file] [log] [blame]
Akira Hatanakaed2a7d22011-11-29 23:08:41 +00001; RUN: llc -march=mips -mcpu=mips32r2 < %s | FileCheck %s
Akira Hatanakabb15e112011-08-17 02:05:42 +00002
3define i32 @ext0_5_9(i32 %s, i32 %pos, i32 %sz) nounwind readnone {
4entry:
5; CHECK: ext ${{[0-9]+}}, $4, 5, 9
6 %shr = lshr i32 %s, 5
7 %and = and i32 %shr, 511
8 ret i32 %and
9}
10
11define void @ins2_5_9(i32 %s, i32* nocapture %d) nounwind {
12entry:
13; CHECK: ins ${{[0-9]+}}, $4, 5, 9
14 %and = shl i32 %s, 5
15 %shl = and i32 %and, 16352
16 %tmp3 = load i32* %d, align 4
17 %and5 = and i32 %tmp3, -16353
18 %or = or i32 %and5, %shl
19 store i32 %or, i32* %d, align 4
20 ret void
21}