void foo(int y, short z) {
  int x;
#pragma omp target teams map(from : x)
#pragma omp distribute simd linear(x : 2)
  for (x = 0; x < 64; x += 2)
    ;
#pragma omp target teams map(from : x)
#pragma omp distribute parallel for simd linear(x)
  for (x = 0; x < 64; x++)
    ;
#pragma omp target teams map(tofrom : y)
#pragma omp distribute simd linear(y : 2)
  for (x = 0; x < 64; x += 2)
    y += 2;
#pragma omp target teams map(tofrom : z)
#pragma omp distribute parallel for simd linear(z)
  for (x = 0; x < 64; x++)
    z++;
#pragma omp target teams map(tofrom : z)
#pragma omp distribute parallel for linear(z : 4)
  for (x = 0; x < 64; x++)
    z += 4;
#pragma omp target map(from : x)
#pragma omp teams distribute simd linear(x : 2)
  for (x = 0; x < 64; x += 2)
    ;
#pragma omp target map(from : x)
#pragma omp teams distribute parallel for simd linear(x)
  for (x = 0; x < 64; x++)
    ;
#pragma omp target map(tofrom : y)
#pragma omp teams distribute simd linear(y : 2)
  for (x = 0; x < 64; x += 2)
    y += 2;
#pragma omp target map(tofrom : z)
#pragma omp teams distribute parallel for simd linear(z)
  for (x = 0; x < 64; x++)
    z++;
#pragma omp target map(tofrom : z)
#pragma omp teams distribute parallel for linear(z : 4)
  for (x = 0; x < 64; x++)
    z += 4;
#pragma omp target parallel copyin(t)
  ;
#pragma omp target parallel for copyin(t)
  for (x = 0; x < 64; x++)
    ;
#pragma omp target parallel for simd copyin(t)
  for (x = 0; x < 64; x++)
    ;
#pragma omp target teams
#pragma omp distribute parallel for ordered
  for (x = 0; x < 64; x++) {
#pragma omp ordered
    ;
  }
#pragma omp target teams
#pragma omp distribute parallel for simd ordered
  for (x = 0; x < 64; x++) {
#pragma omp ordered simd, threads
    ;
  }
#pragma omp target
#pragma omp teams distribute parallel for ordered
  for (x = 0; x < 64; x++) {
#pragma omp ordered
    ;
  }
#pragma omp target
#pragma omp teams distribute parallel for simd ordered
  for (x = 0; x < 64; x++) {
#pragma omp ordered simd, threads
    ;
  }
#pragma omp target teams distribute parallel for ordered
  for (x = 0; x < 64; x++) {
#pragma omp ordered
    ;
  }
#pragma omp target teams distribute parallel for simd ordered
  for (x = 0; x < 64; x++) {
#pragma omp ordered simd, threads
    ;
  }
#pragma omp simd
  for (x = 0; x < 64; x++) {
#pragma omp ordered threads simd
    ;
  }
#pragma omp for
  for (x = 0; x < 64; x++) {
#pragma omp simd
    for (y = 0; y < 16; y++) {
#pragma omp ordered simd threads
      ;
    }
  }
#pragma omp for simd
  for (x = 0; x < 64; x++) {
#pragma omp ordered threads simd
    ;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1132 <foo+0x32>
jmp    1124 <foo+0x24>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <foo+0x15>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1156 <foo+0x56>
jmp    1148 <foo+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1139 <foo+0x39>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    117e <foo+0x7e>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    115d <foo+0x5d>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    11a9 <foo+0xa9>
mov    -0x6(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x6(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1185 <foo+0x85>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    11d3 <foo+0xd3>
movswl -0x6(%rbp),%eax
add    $0x4,%eax
mov    %ax,-0x6(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b0 <foo+0xb0>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    11f7 <foo+0xf7>
jmp    11e9 <foo+0xe9>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    11da <foo+0xda>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    121b <foo+0x11b>
jmp    120d <foo+0x10d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11fe <foo+0xfe>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1243 <foo+0x143>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    1222 <foo+0x122>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    126e <foo+0x16e>
mov    -0x6(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x6(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    124a <foo+0x14a>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1298 <foo+0x198>
movswl -0x6(%rbp),%eax
add    $0x4,%eax
mov    %ax,-0x6(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1275 <foo+0x175>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    12bc <foo+0x1bc>
jmp    12ae <foo+0x1ae>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    129f <foo+0x19f>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    12e0 <foo+0x1e0>
jmp    12d2 <foo+0x1d2>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12c3 <foo+0x1c3>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1304 <foo+0x204>
jmp    12f6 <foo+0x1f6>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12e7 <foo+0x1e7>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1328 <foo+0x228>
jmp    131a <foo+0x21a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    130b <foo+0x20b>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    134c <foo+0x24c>
jmp    133e <foo+0x23e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    132f <foo+0x22f>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1370 <foo+0x270>
jmp    1362 <foo+0x262>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1353 <foo+0x253>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1394 <foo+0x294>
jmp    1386 <foo+0x286>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1377 <foo+0x277>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    13b8 <foo+0x2b8>
jmp    13aa <foo+0x2aa>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    139b <foo+0x29b>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    13dc <foo+0x2dc>
jmp    13ce <foo+0x2ce>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13bf <foo+0x2bf>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1424 <foo+0x324>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1411 <foo+0x311>
jmp    1403 <foo+0x303>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    13f4 <foo+0x2f4>
jmp    1416 <foo+0x316>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13e3 <foo+0x2e3>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    1448 <foo+0x348>
jmp    143a <foo+0x33a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    142b <foo+0x32b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
ret

LLVM IR (-O0):
define void @foo(i32 %0, i16 signext %1) {
%3 = alloca i32
%4 = alloca i16
%5 = alloca i32
store i32 %0, i32* %3
store i16 %1, i16* %4
store i32 0, i32* %5
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 64
br i1 %8, label %9, label %13
9: ; preds = %6
br label %10
10: ; preds = %9
%11 = load i32, i32* %5
%12 = add nsw i32 %11, 2
store i32 %12, i32* %5
br label %6
13: ; preds = %6
store i32 0, i32* %5
br label %14
14: ; preds = %18, %13
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 64
br i1 %16, label %17, label %21
17: ; preds = %14
br label %18
18: ; preds = %17
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %14
21: ; preds = %14
store i32 0, i32* %5
br label %22
22: ; preds = %28, %21
%23 = load i32, i32* %5
%24 = icmp slt i32 %23, 64
br i1 %24, label %25, label %31
25: ; preds = %22
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 2
store i32 %27, i32* %3
br label %28
28: ; preds = %25
%29 = load i32, i32* %5
%30 = add nsw i32 %29, 2
store i32 %30, i32* %5
br label %22
31: ; preds = %22
store i32 0, i32* %5
br label %32
32: ; preds = %38, %31
%33 = load i32, i32* %5
%34 = icmp slt i32 %33, 64
br i1 %34, label %35, label %41
35: ; preds = %32
%36 = load i16, i16* %4
%37 = add i16 %36, 1
store i16 %37, i16* %4
br label %38
38: ; preds = %35
%39 = load i32, i32* %5
%40 = add nsw i32 %39, 1
store i32 %40, i32* %5
br label %32
41: ; preds = %32
store i32 0, i32* %5
br label %42
42: ; preds = %50, %41
%43 = load i32, i32* %5
%44 = icmp slt i32 %43, 64
br i1 %44, label %45, label %53
45: ; preds = %42
%46 = load i16, i16* %4
%47 = sext i16 %46 to i32
%48 = add nsw i32 %47, 4
%49 = trunc i32 %48 to i16
store i16 %49, i16* %4
br label %50
50: ; preds = %45
%51 = load i32, i32* %5
%52 = add nsw i32 %51, 1
store i32 %52, i32* %5
br label %42
53: ; preds = %42
store i32 0, i32* %5
br label %54
54: ; preds = %58, %53
%55 = load i32, i32* %5
%56 = icmp slt i32 %55, 64
br i1 %56, label %57, label %61
57: ; preds = %54
br label %58
58: ; preds = %57
%59 = load i32, i32* %5
%60 = add nsw i32 %59, 2
store i32 %60, i32* %5
br label %54
61: ; preds = %54
store i32 0, i32* %5
br label %62
62: ; preds = %66, %61
%63 = load i32, i32* %5
%64 = icmp slt i32 %63, 64
br i1 %64, label %65, label %69
65: ; preds = %62
br label %66
66: ; preds = %65
%67 = load i32, i32* %5
%68 = add nsw i32 %67, 1
store i32 %68, i32* %5
br label %62
69: ; preds = %62
store i32 0, i32* %5
br label %70
70: ; preds = %76, %69
%71 = load i32, i32* %5
%72 = icmp slt i32 %71, 64
br i1 %72, label %73, label %79
73: ; preds = %70
%74 = load i32, i32* %3
%75 = add nsw i32 %74, 2
store i32 %75, i32* %3
br label %76
76: ; preds = %73
%77 = load i32, i32* %5
%78 = add nsw i32 %77, 2
store i32 %78, i32* %5
br label %70
79: ; preds = %70
store i32 0, i32* %5
br label %80
80: ; preds = %86, %79
%81 = load i32, i32* %5
%82 = icmp slt i32 %81, 64
br i1 %82, label %83, label %89
83: ; preds = %80
%84 = load i16, i16* %4
%85 = add i16 %84, 1
store i16 %85, i16* %4
br label %86
86: ; preds = %83
%87 = load i32, i32* %5
%88 = add nsw i32 %87, 1
store i32 %88, i32* %5
br label %80
89: ; preds = %80
store i32 0, i32* %5
br label %90
90: ; preds = %98, %89
%91 = load i32, i32* %5
%92 = icmp slt i32 %91, 64
br i1 %92, label %93, label %101
93: ; preds = %90
%94 = load i16, i16* %4
%95 = sext i16 %94 to i32
%96 = add nsw i32 %95, 4
%97 = trunc i32 %96 to i16
store i16 %97, i16* %4
br label %98
98: ; preds = %93
%99 = load i32, i32* %5
%100 = add nsw i32 %99, 1
store i32 %100, i32* %5
br label %90
101: ; preds = %90
store i32 0, i32* %5
br label %102
102: ; preds = %106, %101
%103 = load i32, i32* %5
%104 = icmp slt i32 %103, 64
br i1 %104, label %105, label %109
105: ; preds = %102
br label %106
106: ; preds = %105
%107 = load i32, i32* %5
%108 = add nsw i32 %107, 1
store i32 %108, i32* %5
br label %102
109: ; preds = %102
store i32 0, i32* %5
br label %110
110: ; preds = %114, %109
%111 = load i32, i32* %5
%112 = icmp slt i32 %111, 64
br i1 %112, label %113, label %117
113: ; preds = %110
br label %114
114: ; preds = %113
%115 = load i32, i32* %5
%116 = add nsw i32 %115, 1
store i32 %116, i32* %5
br label %110
117: ; preds = %110
store i32 0, i32* %5
br label %118
118: ; preds = %122, %117
%119 = load i32, i32* %5
%120 = icmp slt i32 %119, 64
br i1 %120, label %121, label %125
121: ; preds = %118
br label %122
122: ; preds = %121
%123 = load i32, i32* %5
%124 = add nsw i32 %123, 1
store i32 %124, i32* %5
br label %118
125: ; preds = %118
store i32 0, i32* %5
br label %126
126: ; preds = %130, %125
%127 = load i32, i32* %5
%128 = icmp slt i32 %127, 64
br i1 %128, label %129, label %133
129: ; preds = %126
br label %130
130: ; preds = %129
%131 = load i32, i32* %5
%132 = add nsw i32 %131, 1
store i32 %132, i32* %5
br label %126
133: ; preds = %126
store i32 0, i32* %5
br label %134
134: ; preds = %138, %133
%135 = load i32, i32* %5
%136 = icmp slt i32 %135, 64
br i1 %136, label %137, label %141
137: ; preds = %134
br label %138
138: ; preds = %137
%139 = load i32, i32* %5
%140 = add nsw i32 %139, 1
store i32 %140, i32* %5
br label %134
141: ; preds = %134
store i32 0, i32* %5
br label %142
142: ; preds = %146, %141
%143 = load i32, i32* %5
%144 = icmp slt i32 %143, 64
br i1 %144, label %145, label %149
145: ; preds = %142
br label %146
146: ; preds = %145
%147 = load i32, i32* %5
%148 = add nsw i32 %147, 1
store i32 %148, i32* %5
br label %142
149: ; preds = %142
store i32 0, i32* %5
br label %150
150: ; preds = %154, %149
%151 = load i32, i32* %5
%152 = icmp slt i32 %151, 64
br i1 %152, label %153, label %157
153: ; preds = %150
br label %154
154: ; preds = %153
%155 = load i32, i32* %5
%156 = add nsw i32 %155, 1
store i32 %156, i32* %5
br label %150
157: ; preds = %150
store i32 0, i32* %5
br label %158
158: ; preds = %162, %157
%159 = load i32, i32* %5
%160 = icmp slt i32 %159, 64
br i1 %160, label %161, label %165
161: ; preds = %158
br label %162
162: ; preds = %161
%163 = load i32, i32* %5
%164 = add nsw i32 %163, 1
store i32 %164, i32* %5
br label %158
165: ; preds = %158
store i32 0, i32* %5
br label %166
166: ; preds = %170, %165
%167 = load i32, i32* %5
%168 = icmp slt i32 %167, 64
br i1 %168, label %169, label %173
169: ; preds = %166
br label %170
170: ; preds = %169
%171 = load i32, i32* %5
%172 = add nsw i32 %171, 1
store i32 %172, i32* %5
br label %166
173: ; preds = %166
store i32 0, i32* %5
br label %174
174: ; preds = %186, %173
%175 = load i32, i32* %5
%176 = icmp slt i32 %175, 64
br i1 %176, label %177, label %189
177: ; preds = %174
store i32 0, i32* %3
br label %178
178: ; preds = %182, %177
%179 = load i32, i32* %3
%180 = icmp slt i32 %179, 16
br i1 %180, label %181, label %185
181: ; preds = %178
br label %182
182: ; preds = %181
%183 = load i32, i32* %3
%184 = add nsw i32 %183, 1
store i32 %184, i32* %3
br label %178
185: ; preds = %178
br label %186
186: ; preds = %185
%187 = load i32, i32* %5
%188 = add nsw i32 %187, 1
store i32 %188, i32* %5
br label %174
189: ; preds = %174
store i32 0, i32* %5
br label %190
190: ; preds = %194, %189
%191 = load i32, i32* %5
%192 = icmp slt i32 %191, 64
br i1 %192, label %193, label %197
193: ; preds = %190
br label %194
194: ; preds = %193
%195 = load i32, i32* %5
%196 = add nsw i32 %195, 1
store i32 %196, i32* %5
br label %190
197: ; preds = %190
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0, i16 signext %1) {
ret void
}