1 ; RUN: llc -O2 -march=hexagon < %s | FileCheck %s
3 ; CHECK-DAG: extractu(r{{[0-9]*}},#3,#4)
4 ; CHECK-DAG: extractu(r{{[0-9]*}},#8,#7)
5 ; CHECK-DAG: extractu(r{{[0-9]*}},#8,#16)
24 ; void foo(structx_t *px, structy_t *py) {
32 target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-v64:64:64-v32:32:32-a0:0-n16:32"
33 target triple = "hexagon"
35 %struct.structx_t = type { i8, i8, i8, i8 }
36 %struct.structy_t = type { i8, i8, i8, i8 }
38 define void @foo(ptr nocapture %px, ptr nocapture %py) nounwind {
40 %0 = load i32, ptr %py, align 4
41 %bf.value = and i32 %0, 7
42 %1 = load i32, ptr %px, align 4
44 %3 = or i32 %2, %bf.value
45 store i32 %3, ptr %px, align 4
46 %4 = load i32, ptr %py, align 4
48 %bf.clear1 = shl nuw nsw i32 %5, 3
49 %6 = and i32 %bf.clear1, 56
50 %7 = and i32 %3, -1017
52 store i32 %8, ptr %px, align 4
53 %9 = load i32, ptr %py, align 4
55 %bf.value4 = shl i32 %10, 10
56 %11 = and i32 %bf.value4, 261120
57 %12 = and i32 %8, -262081
59 store i32 %13, ptr %px, align 4
60 %14 = load i32, ptr %py, align 4
61 %15 = lshr i32 %14, 16
62 %bf.clear5 = shl i32 %15, 18
63 %16 = and i32 %bf.clear5, 66846720
64 %17 = and i32 %13, -1073480641
66 store i32 %18, ptr %px, align 4
67 %19 = load i32, ptr %py, align 4
68 %20 = lshr i32 %19, 24
70 %22 = and i32 %18, 67107903
72 store i32 %23, ptr %px, align 4