1; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s 2 3define void @nop_test() { 4entry: 5; CHECK-LABEL: nop_test: 6; CHECK: nop 7; CHECK: xchgw %ax, %ax 8; CHECK: nopl (%rax) 9; CHECK: nopl 8(%rax) 10; CHECK: nopl 8(%rax,%rax) 11; CHECK: nopw 8(%rax,%rax) 12; CHECK: nopl 512(%rax) 13; CHECK: nopl 512(%rax,%rax) 14; CHECK: nopw 512(%rax,%rax) 15; CHECK: nopw %cs:512(%rax,%rax) 16 17; 11 18; CHECK: .byte 102 19; CHECK-NEXT: nopw %cs:512(%rax,%rax) 20 21; 12 22; CHECK: .byte 102 23; CHECK-NEXT: .byte 102 24; CHECK-NEXT: nopw %cs:512(%rax,%rax) 25 26; 13 27; CHECK: .byte 102 28; CHECK-NEXT: .byte 102 29; CHECK-NEXT: .byte 102 30; CHECK-NEXT: nopw %cs:512(%rax,%rax) 31 32; 14 33; CHECK: .byte 102 34; CHECK-NEXT: .byte 102 35; CHECK-NEXT: .byte 102 36; CHECK-NEXT: .byte 102 37; CHECK-NEXT: nopw %cs:512(%rax,%rax) 38 39; 15 40; CHECK: .byte 102 41; CHECK-NEXT: .byte 102 42; CHECK-NEXT: .byte 102 43; CHECK-NEXT: .byte 102 44; CHECK-NEXT: .byte 102 45; CHECK-NEXT: nopw %cs:512(%rax,%rax) 46 47; 16 48; CHECK: .byte 102 49; CHECK-NEXT: .byte 102 50; CHECK-NEXT: .byte 102 51; CHECK-NEXT: .byte 102 52; CHECK-NEXT: .byte 102 53; CHECK-NEXT: nopw %cs:512(%rax,%rax) 54; CHECK-NEXT: nop 55 56; 17 57; CHECK: .byte 102 58; CHECK-NEXT: .byte 102 59; CHECK-NEXT: .byte 102 60; CHECK-NEXT: .byte 102 61; CHECK-NEXT: .byte 102 62; CHECK-NEXT: nopw %cs:512(%rax,%rax) 63; CHECK-NEXT: xchgw %ax, %ax 64 65; 18 66; CHECK: .byte 102 67; CHECK-NEXT: .byte 102 68; CHECK-NEXT: .byte 102 69; CHECK-NEXT: .byte 102 70; CHECK-NEXT: .byte 102 71; CHECK-NEXT: nopw %cs:512(%rax,%rax) 72; CHECK-NEXT: nopl (%rax) 73 74; 19 75; CHECK: .byte 102 76; CHECK-NEXT: .byte 102 77; CHECK-NEXT: .byte 102 78; CHECK-NEXT: .byte 102 79; CHECK-NEXT: .byte 102 80; CHECK-NEXT: nopw %cs:512(%rax,%rax) 81; CHECK-NEXT: nopl 8(%rax) 82 83; 20 84; CHECK: .byte 102 85; CHECK-NEXT: .byte 102 86; CHECK-NEXT: .byte 102 87; CHECK-NEXT: .byte 102 88; CHECK-NEXT: .byte 102 89; CHECK-NEXT: nopw %cs:512(%rax,%rax) 90; CHECK-NEXT: nopl 8(%rax,%rax) 91 92; 21 93; CHECK: .byte 102 94; CHECK-NEXT: .byte 102 95; CHECK-NEXT: .byte 102 96; CHECK-NEXT: .byte 102 97; CHECK-NEXT: .byte 102 98; CHECK-NEXT: nopw %cs:512(%rax,%rax) 99; CHECK-NEXT: nopw 8(%rax,%rax) 100 101; 22 102; CHECK: .byte 102 103; CHECK-NEXT: .byte 102 104; CHECK-NEXT: .byte 102 105; CHECK-NEXT: .byte 102 106; CHECK-NEXT: .byte 102 107; CHECK-NEXT: nopw %cs:512(%rax,%rax) 108; CHECK-NEXT: nopl 512(%rax) 109 110; 23 111; CHECK: .byte 102 112; CHECK-NEXT: .byte 102 113; CHECK-NEXT: .byte 102 114; CHECK-NEXT: .byte 102 115; CHECK-NEXT: .byte 102 116; CHECK-NEXT: nopw %cs:512(%rax,%rax) 117; CHECK-NEXT: nopl 512(%rax,%rax) 118 119; 24 120; CHECK: .byte 102 121; CHECK-NEXT: .byte 102 122; CHECK-NEXT: .byte 102 123; CHECK-NEXT: .byte 102 124; CHECK-NEXT: .byte 102 125; CHECK-NEXT: nopw %cs:512(%rax,%rax) 126; CHECK-NEXT: nopw 512(%rax,%rax) 127 128; 25 129; CHECK: .byte 102 130; CHECK-NEXT: .byte 102 131; CHECK-NEXT: .byte 102 132; CHECK-NEXT: .byte 102 133; CHECK-NEXT: .byte 102 134; CHECK-NEXT: nopw %cs:512(%rax,%rax) 135; CHECK-NEXT: nopw %cs:512(%rax,%rax) 136 137; 26 138; CHECK: .byte 102 139; CHECK-NEXT: .byte 102 140; CHECK-NEXT: .byte 102 141; CHECK-NEXT: .byte 102 142; CHECK-NEXT: .byte 102 143; CHECK-NEXT: nopw %cs:512(%rax,%rax) 144; CHECK-NEXT: .byte 102 145; CHECK-NEXT: nopw %cs:512(%rax,%rax) 146 147; 27 148; CHECK: .byte 102 149; CHECK-NEXT: .byte 102 150; CHECK-NEXT: .byte 102 151; CHECK-NEXT: .byte 102 152; CHECK-NEXT: .byte 102 153; CHECK-NEXT: nopw %cs:512(%rax,%rax) 154; CHECK-NEXT: .byte 102 155; CHECK-NEXT: .byte 102 156; CHECK-NEXT: nopw %cs:512(%rax,%rax) 157 158; 28 159; CHECK: .byte 102 160; CHECK-NEXT: .byte 102 161; CHECK-NEXT: .byte 102 162; CHECK-NEXT: .byte 102 163; CHECK-NEXT: .byte 102 164; CHECK-NEXT: nopw %cs:512(%rax,%rax) 165; CHECK-NEXT: .byte 102 166; CHECK-NEXT: .byte 102 167; CHECK-NEXT: .byte 102 168; CHECK-NEXT: nopw %cs:512(%rax,%rax) 169 170;29 171; CHECK: .byte 102 172; CHECK-NEXT: .byte 102 173; CHECK-NEXT: .byte 102 174; CHECK-NEXT: .byte 102 175; CHECK-NEXT: .byte 102 176; CHECK-NEXT: nopw %cs:512(%rax,%rax) 177; CHECK-NEXT: .byte 102 178; CHECK-NEXT: .byte 102 179; CHECK-NEXT: .byte 102 180; CHECK-NEXT: .byte 102 181; CHECK-NEXT: nopw %cs:512(%rax,%rax) 182 183; 30 184; CHECK: .byte 102 185; CHECK-NEXT: .byte 102 186; CHECK-NEXT: .byte 102 187; CHECK-NEXT: .byte 102 188; CHECK-NEXT: .byte 102 189; CHECK-NEXT: nopw %cs:512(%rax,%rax) 190; CHECK-NEXT: .byte 102 191; CHECK-NEXT: .byte 102 192; CHECK-NEXT: .byte 102 193; CHECK-NEXT: .byte 102 194; CHECK-NEXT: .byte 102 195; CHECK-NEXT: nopw %cs:512(%rax,%rax) 196 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 0, i32 0) 197 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 1, i32 1) 198 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 2, i32 2) 199 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 3, i32 3) 200 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 4, i32 4) 201 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 5, i32 5) 202 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 6, i32 6) 203 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 7, i32 7) 204 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 8, i32 8) 205 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 9, i32 9) 206 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 10, i32 10) 207 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 11, i32 11) 208 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 12, i32 12) 209 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 13, i32 13) 210 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 14, i32 14) 211 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 15, i32 15) 212 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 16, i32 16) 213 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 17, i32 17) 214 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 18, i32 18) 215 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 19, i32 19) 216 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 20, i32 20) 217 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 21, i32 21) 218 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 22, i32 22) 219 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 23, i32 23) 220 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 24, i32 24) 221 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 25, i32 25) 222 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 26, i32 26) 223 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 27, i32 27) 224 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 28, i32 28) 225 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 29, i32 29) 226 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 30, i32 30) 227; Add an extra stackmap with a zero-length shadow to thwart the shadow 228; optimization. This will force all 15 bytes of the previous shadow to be 229; padded with nops. 230 tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 31, i32 0) 231 ret void 232} 233 234declare void @llvm.experimental.stackmap(i64, i32, ...) 235