================
@@ -106,187 +268,434 @@ struct S {
 };
 
 void t14(struct S *P) {
-  __asm__("abc %0" : "=r"(P->a) );
+  // X86_64-O0-LABEL: define{{.*}} void @t14
+  // X86_64-O0:         call i32 asm "abc $0", 
"=r,~{dirflag},~{fpsr},~{flags}"()
+  //
+  // X86_64-O2-LABEL: define{{.*}} void @t14
+  // X86_64-O2:         call i32 asm "abc $0", 
"=r,~{dirflag},~{fpsr},~{flags}"()
+  //
+  // I386-O0-LABEL:   define{{.*}} void @t14
+  // I386-O0:           call i32 asm "abc $0", 
"=r,~{dirflag},~{fpsr},~{flags}"()
+  //
+  // I386-O2-LABEL:   define{{.*}} void @t14
+  // I386-O2:           call i32 asm "abc $0", 
"=r,~{dirflag},~{fpsr},~{flags}"()
+  __asm__ ("abc %0" : "=r" (P->a));
+}
+
+struct large {
+  int x[1000];
+};
+
+unsigned long t15(int x, struct large *P) {
+  // X86_64-O0-LABEL: define{{.*}} i64 @t15
+  // X86_64-O0:         call i32 asm "xyz ", 
"=r,*m,0,~{dirflag},~{fpsr},~{flags}"
+  // X86_64-O0-SAME:      (ptr elementtype(%struct.large) %{{.*}}, i32 %{{.*}})
+  //
+  // X86_64-O2-LABEL: define{{.*}} i64 @t15
+  // X86_64-O2:         call i32 asm "xyz ", 
"=r,*m,0,~{dirflag},~{fpsr},~{flags}"
+  // X86_64-O2-SAME:      (ptr elementtype(%struct.large) %P, i32 %x)
+  //
+  // I386-O0-LABEL:   define{{.*}} i32 @t15
+  // I386-O0:           call i32 asm "xyz ", 
"=r,*m,0,~{dirflag},~{fpsr},~{flags}"
+  // I386-O0-SAME:        (ptr elementtype(%struct.large) %{{.*}}, i32 %{{.*}})
+  //
+  // I386-O2-LABEL:   define{{.*}} i32 @t15
+  // I386-O2:           call i32 asm "xyz ", 
"=r,*m,0,~{dirflag},~{fpsr},~{flags}"
+  // I386-O2-SAME:        (ptr elementtype(%struct.large) %P, i32 %x)
+  __asm__ ("xyz " : "=r" (x) : "m" (*P), "0" (x));
+  return x;
 }
 
 // PR4938
 int t16(void) {
-  int a,b;
-  asm ( "nop;"
-       :"=%c" (a)
-       : "r" (b)
-       );
+  // X86_64-O0-LABEL: define{{.*}} i32 @t16
+  // X86_64-O0:         call i32 asm "nop;", 
"=%{cx},r,~{dirflag},~{fpsr},~{flags}"(i32 %{{.*}})
+  //
+  // X86_64-O2-LABEL: define{{.*}} i32 @t16
+  // X86_64-O2:         call i32 asm "nop;", 
"=%{cx},r,~{dirflag},~{fpsr},~{flags}"(i32 undef)
+  //
+  // I386-O0-LABEL:   define{{.*}} i32 @t16
+  // I386-O0:           call i32 asm "nop;", 
"=%{cx},r,~{dirflag},~{fpsr},~{flags}"(i32 %{{.*}})
+  //
+  // I386-O2-LABEL:   define{{.*}} i32 @t16
+  // I386-O2:           call i32 asm "nop;", 
"=%{cx},r,~{dirflag},~{fpsr},~{flags}"(i32 undef)
+  int a, b;
+
+  asm ("nop;" :"=%c" (a) : "r" (b));
   return 0;
 }
 
 // PR6475
 void t17(void) {
+  // X86_64-O0-LABEL: define{{.*}} void @t17
+  // X86_64-O0:         call void asm "nop", 
"=*m,~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) %{{.*}})
+  //
+  // X86_64-O2-LABEL: define{{.*}} void @t17
+  // X86_64-O2:         call void asm "nop", 
"=*m,~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) %{{.*}})
+  //
+  // I386-O0-LABEL:   define{{.*}} void @t17
+  // I386-O0:           call void asm "nop", 
"=*m,~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) %{{.*}})
+  //
+  // I386-O2-LABEL:   define{{.*}} void @t17
+  // I386-O2:           call void asm "nop", 
"=*m,~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) %{{.*}})
   int i;
-  __asm__ ( "nop": "=m"(i));
 
-// CHECK: @t17()
-// CHECK: call void asm "nop", "=*m,
+  __asm__ ("nop": "=m" (i));
 }
 
 int t18(unsigned data) {
+  // X86_64-O0-LABEL: define{{.*}} i32 @t18
+  // X86_64-O0:         [[ASM_RES:%[a-z0-9.]+]] ={{.*}} call { i32, i32 }
+  // X86_64-O0-SAME:      asm "xyz", 
"={ax},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 {{.*}})
+  // X86_64-O0-NEXT:    extractvalue { i32, i32 } [[ASM_RES]], 0
+  // X86_64-O0-NEXT:    extractvalue { i32, i32 } [[ASM_RES]], 1
+  //
+  // X86_64-O2-LABEL: define{{.*}} i32 @t18
+  // X86_64-O2:         [[ASM_RES:%[a-z0-9.]+]] ={{.*}} call { i32, i32 }
+  // X86_64-O2-SAME:      asm "xyz", 
"={ax},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 {{.*}})
+  // X86_64-O2-NEXT:    extractvalue { i32, i32 } [[ASM_RES]], 0
+  // X86_64-O2-NEXT:    extractvalue { i32, i32 } [[ASM_RES]], 1
+  //
+  // I386-O0-LABEL:   define{{.*}} i32 @t18
+  // I386-O0:           [[ASM_RES:%[a-z0-9.]+]] ={{.*}} call { i32, i32 }
+  // I386-O0-SAME:        asm "xyz", 
"={ax},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 {{.*}})
+  // I386-O0-NEXT:      extractvalue { i32, i32 } [[ASM_RES]], 0
+  // I386-O0-NEXT:      extractvalue { i32, i32 } [[ASM_RES]], 1
+  //
+  // I386-O2-LABEL:   define{{.*}} i32 @t18
+  // I386-O2:           [[ASM_RES:%[a-z0-9.]+]] ={{.*}} call { i32, i32 }
+  // I386-O2-SAME:        asm "xyz", 
"={ax},={dx},{ax},~{dirflag},~{fpsr},~{flags}"(i32 {{.*}})
+  // I386-O2-NEXT:      extractvalue { i32, i32 } [[ASM_RES]], 0
+  // I386-O2-NEXT:      extractvalue { i32, i32 } [[ASM_RES]], 1
   int a, b;
 
-  asm("xyz" :"=a"(a), "=d"(b) : "a"(data));
+  asm ("xyz" : "=a" (a), "=d" (b) : "a" (data));
   return a + b;
-// CHECK: t18(i32
-// CHECK: = call {{.*}}asm "xyz"
-// CHECK-NEXT: extractvalue
-// CHECK-NEXT: extractvalue
 }
 
 // PR6780
 int t19(unsigned data) {
+  // X86_64-O0-LABEL: define{{.*}} i32 @t19
+  // X86_64-O0:         call i32 asm "x$(abc$|def$|ghi$)z", 
"=r,r,~{dirflag},~{fpsr},~{flags}"(i32 {{.*}})
+  //
+  // X86_64-O2-LABEL: define{{.*}} i32 @t19
+  // X86_64-O2:         call i32 asm "x$(abc$|def$|ghi$)z", 
"=r,r,~{dirflag},~{fpsr},~{flags}"(i32 {{.*}})
+  //
+  // I386-O0-LABEL:   define{{.*}} i32 @t19
+  // I386-O0:           call i32 asm "x$(abc$|def$|ghi$)z", 
"=r,r,~{dirflag},~{fpsr},~{flags}"(i32 {{.*}})
+  //
+  // I386-O2-LABEL:   define{{.*}} i32 @t19
+  // I386-O2:           call i32 asm "x$(abc$|def$|ghi$)z", 
"=r,r,~{dirflag},~{fpsr},~{flags}"(i32 {{.*}})
   int a, b;
 
-  asm("x{abc|def|ghi}z" :"=r"(a): "r"(data));
+  asm ("x{abc|def|ghi}z" : "=r" (a) : "r" (data));
   return a + b;
-  // CHECK: t19(i32
-  // CHECK: = call {{.*}}asm "x$(abc$|def$|ghi$)z"
 }
 
 // PR6845 - Mismatching source/dest fp types.
 double t20(double x) {
+  // X86_64-O0-LABEL: define{{.*}} double @t20
+  // X86_64-O0:         fpext double {{.*}} to x86_fp80
+  // X86_64-O0-NEXT:    call x86_fp80 asm sideeffect "frndint", 
"={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 {{.*}})
+  // X86_64-O0:         fptrunc x86_fp80 {{.*}} to double
+  //
+  // X86_64-O2-LABEL: define{{.*}} double @t20
+  // X86_64-O2:         fpext double {{.*}} to x86_fp80
+  // X86_64-O2-NEXT:    call x86_fp80 asm sideeffect "frndint", 
"={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 {{.*}})
+  // X86_64-O2-NEXT:    fptrunc x86_fp80 {{.*}} to double
+  //
+  // I386-O0-LABEL:   define{{.*}} double @t20
+  // I386-O0:           fpext double {{.*}} to x86_fp80
+  // I386-O0-NEXT:      call x86_fp80 asm sideeffect "frndint", 
"={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 {{.*}})
+  // I386-O0:           fptrunc x86_fp80 {{.*}} to double
+  //
+  // I386-O2-LABEL:   define{{.*}} double @t20
+  // I386-O2:           fpext double {{.*}} to x86_fp80
+  // I386-O2-NEXT:      call x86_fp80 asm sideeffect "frndint", 
"={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 {{.*}})
+  // I386-O2:           fptrunc x86_fp80 {{.*}} to double
   register long double result;
+
   __asm __volatile ("frndint"  : "=t" (result) : "0" (x));
   return result;
-
-  // CHECK: @t20
-  // CHECK: fpext double {{.*}} to x86_fp80
-  // CHECK-NEXT: call x86_fp80 asm sideeffect "frndint"
-  // CHECK: fptrunc x86_fp80 {{.*}} to double
 }
 
 float t21(long double x) {
+  // X86_64-O0-LABEL: define{{.*}} float @t21
+  // X86_64-O0:         call x86_fp80 asm sideeffect "frndint", 
"={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 {{.*}})
+  // X86_64-O0-NEXT:    fptrunc x86_fp80 {{.*}} to float
+  //
+  // X86_64-O2-LABEL: define{{.*}} float @t21
+  // X86_64-O2:         call x86_fp80 asm sideeffect "frndint", 
"={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 {{.*}})
+  // X86_64-O2-NEXT:    fptrunc x86_fp80 {{.*}} to float
+  //
+  // I386-O0-LABEL:   define{{.*}} float @t21
+  // I386-O0:           call x86_fp80 asm sideeffect "frndint", 
"={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 {{.*}})
+  // I386-O0-NEXT:      fptrunc x86_fp80 {{.*}} to float
+  //
+  // I386-O2-LABEL:   define{{.*}} float @t21
+  // I386-O2:           call x86_fp80 asm sideeffect "frndint", 
"={st},0,~{dirflag},~{fpsr},~{flags}"(x86_fp80 {{.*}})
+  // I386-O2-NEXT:      fptrunc x86_fp80 {{.*}} to float
   register float result;
+
   __asm __volatile ("frndint"  : "=t" (result) : "0" (x));
   return result;
-  // CHECK: @t21
-  // CHECK: call x86_fp80 asm sideeffect "frndint"
-  // CHECK-NEXT: fptrunc x86_fp80 {{.*}} to float
 }
 
 // accept 'l' constraint
 unsigned char t22(unsigned char a, unsigned char b) {
+  // X86_64-O0-LABEL: define{{.*}} i8 @t22
+  // X86_64-O0:         call i32 asm "0:\0A1:\0A", 
"=l{ax},0,{cx},~{edx},~{cc},~{dirflag},~{fpsr},~{flags}"
+  // X86_64-O0-SAME:      (i32 {{.*}}, i32 {{.*}})
+  //
+  // X86_64-O2-LABEL: define{{.*}} i8 @t22
+  // X86_64-O2:         call i32 asm "0:\0A1:\0A", 
"=l{ax},0,{cx},~{edx},~{cc},~{dirflag},~{fpsr},~{flags}"
+  // X86_64-O2-SAME:      (i32 {{.*}}, i32 {{.*}})
+  //
+  // I386-O0-LABEL:   define{{.*}} i8 @t22
+  // I386-O0:           call i32 asm "0:\0A1:\0A", 
"=l{ax},0,{cx},~{edx},~{cc},~{dirflag},~{fpsr},~{flags}"
+  // I386-O0-SAME:        (i32 {{.*}}, i32 {{.*}})
+  //
+  // I386-O2-LABEL:   define{{.*}} i8 @t22
+  // I386-O2:           call i32 asm "0:\0A1:\0A", 
"=l{ax},0,{cx},~{edx},~{cc},~{dirflag},~{fpsr},~{flags}"
+  // I386-O2-SAME:        (i32 {{.*}}, i32 {{.*}})
   unsigned int la = a;
   unsigned int lb = b;
   unsigned int bigres;
   unsigned char res;
-  __asm__ ("0:\n1:\n" : [bigres] "=la"(bigres) : [la] "0"(la), [lb] "c"(lb) :
-                        "edx", "cc");
+
+  __asm__ ("0:\n1:\n" : [bigres] "=la"(bigres) : [la] "0"(la), [lb] "c"(lb) : 
"edx", "cc");
   res = bigres;
   return res;
 }
 
 // accept 'l' constraint
 unsigned char t23(unsigned char a, unsigned char b) {
+  // X86_64-O0-LABEL: define{{.*}} i8 @t23
+  // X86_64-O0:         call i32 asm "0:\0A1:\0A", 
"=l{ax},0,{cx},~{edx},~{cc},~{dirflag},~{fpsr},~{flags}"
+  // X86_64-O0-SAME:      (i32 {{.*}}, i32 {{.*}})
+  //
+  // X86_64-O2-LABEL: define{{.*}} i8 @t23
+  // X86_64-O2:         call i32 asm "0:\0A1:\0A", 
"=l{ax},0,{cx},~{edx},~{cc},~{dirflag},~{fpsr},~{flags}"
+  // X86_64-O2-SAME:      (i32 {{.*}}, i32 {{.*}})
+  //
+  // I386-O0-LABEL:   define{{.*}} i8 @t23
+  // I386-O0:           call i32 asm "0:\0A1:\0A", 
"=l{ax},0,{cx},~{edx},~{cc},~{dirflag},~{fpsr},~{flags}"
+  // I386-O0-SAME:        (i32 {{.*}}, i32 {{.*}})
+  //
+  // I386-O2-LABEL:   define{{.*}} i8 @t23
+  // I386-O2:           call i32 asm "0:\0A1:\0A", 
"=l{ax},0,{cx},~{edx},~{cc},~{dirflag},~{fpsr},~{flags}"
+  // I386-O2-SAME:        (i32 {{.*}}, i32 {{.*}})
   unsigned int la = a;
   unsigned int lb = b;
   unsigned char res;
-  __asm__ ("0:\n1:\n" : [res] "=la"(res) : [la] "0"(la), [lb] "c"(lb) :
-                        "edx", "cc");
+
+  __asm__ ("0:\n1:\n" : [res] "=la" (res) : [la] "0" (la), [lb] "c" (lb) : 
"edx", "cc");
   return res;
 }
 
 void *t24(char c) {
+  // X86_64-O0-LABEL: define{{.*}} ptr @t24
+  // X86_64-O0:         [[C:%[a-z0-9.]+]] = zext i8 {{.*}} to i64
+  // X86_64-O0-NEXT:    call ptr asm "foobar", 
"={ax},0,~{dirflag},~{fpsr},~{flags}"(i64 [[C]])
+  //
+  // X86_64-O2-LABEL: define{{.*}} ptr @t24
+  // X86_64-O2:         [[C:%[a-z0-9.]+]] = zext i8 {{.*}} to i64
+  // X86_64-O2-NEXT:    call ptr asm "foobar", 
"={ax},0,~{dirflag},~{fpsr},~{flags}"(i64 [[C]])
+  //
+  // I386-O0-LABEL:   define{{.*}} ptr @t24
+  // I386-O0:           [[C:%[a-z0-9.]+]] = zext i8 {{.*}} to i32
+  // I386-O0-NEXT:      call ptr asm "foobar", 
"={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 [[C]])
+  //
+  // I386-O2-LABEL:   define{{.*}} ptr @t24
+  // I386-O2:           [[C:%[a-z0-9.]+]] = zext i8 {{.*}} to i32
+  // I386-O2-NEXT:      call ptr asm "foobar", 
"={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 [[C]])
   void *addr;
-  // CHECK: @t24
-  // CHECK: zext i8 {{.*}} to i32
-  // CHECK-NEXT: call ptr asm "foobar"
+
   __asm__ ("foobar" : "=a" (addr) : "0" (c));
   return addr;
 }
 
 // PR10299 - fpsr, fpcr
-void t25(void)
-{
-  __asm__ __volatile__(                                           \
-                      "finit"                             \
-                      :                                   \
-                      :                                   \
-                      :"st","st(1)","st(2)","st(3)",      \
-                       "st(4)","st(5)","st(6)","st(7)",   \
-                       "fpsr","fpcr"                      \
-                                                          );
+void t25(void) {
+  // X86_64-O0-LABEL: define{{.*}} void @t25
+  // X86_64-O0:         call void asm sideeffect "finit", 
"~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)},~{fpsr},~{fpcr},~{dirflag},~{fpsr},~{flags}"()
+  //
+  // X86_64-O2-LABEL: define{{.*}} void @t25
+  // X86_64-O2:         call void asm sideeffect "finit", 
"~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)},~{fpsr},~{fpcr},~{dirflag},~{fpsr},~{flags}"()
+  //
+  // I386-O0-LABEL:   define{{.*}} void @t25
+  // I386-O0:           call void asm sideeffect "finit", 
"~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)},~{fpsr},~{fpcr},~{dirflag},~{fpsr},~{flags}"()
+  //
+  // I386-O2-LABEL:   define{{.*}} void @t25
+  // I386-O2:           call void asm sideeffect "finit", 
"~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)},~{fpsr},~{fpcr},~{dirflag},~{fpsr},~{flags}"()
+  __asm__ __volatile__ ("finit" : : :
+                        "st", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)",
+                        "st(6)", "st(7)", "fpsr", "fpcr");
 }
 
 // AVX registers
 typedef long long __m256i __attribute__((__vector_size__(32)));
+
 void t26 (__m256i *p) {
-  __asm__ volatile("vmovaps  %0, %%ymm0" :: "m" (*(__m256i*)p) : "ymm0");
+  // X86_64-O0-LABEL: define{{.*}} void @t26
+  // X86_64-O0:         call void asm sideeffect "vmovaps  $0, %ymm0", 
"*m,~{ymm0},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(<4 x i64>) {{.*}})
+  //
+  // X86_64-O2-LABEL: define{{.*}} void @t26
+  // X86_64-O2:         call void asm sideeffect "vmovaps  $0, %ymm0", 
"*m,~{ymm0},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(<4 x i64>) {{.*}})
+  //
+  // I386-O0-LABEL:   define{{.*}} void @t26
+  // I386-O0:           call void asm sideeffect "vmovaps  $0, %ymm0", 
"*m,~{ymm0},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(<4 x i64>) {{.*}})
+  //
+  // I386-O2-LABEL:   define{{.*}} void @t26
+  // I386-O2:           call void asm sideeffect "vmovaps  $0, %ymm0", 
"*m,~{ymm0},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(<4 x i64>) {{.*}})
+  __asm__ volatile ("vmovaps  %0, %%ymm0" :: "m" (*(__m256i*)p) : "ymm0");
 }
 
 // Check to make sure the inline asm non-standard dialect attribute _not_ is
 // emitted.
 void t27(void) {
-  asm volatile("nop");
-// CHECK: @t27
-// CHECK: call void asm sideeffect "nop"
-// CHECK-NOT: ia_nsdialect
-// CHECK: ret void
+  // X86_64-O0-LABEL: define{{.*}} void @t27
+  // X86_64-O0:         call void asm sideeffect "nop", 
"~{dirflag},~{fpsr},~{flags}"()
+  // X86_64-O0-NOT:     ia_nsdialect
+  // X86_64-O0:         ret void
+  //
+  // X86_64-O2-LABEL: define{{.*}} void @t27
+  // X86_64-O2:         call void asm sideeffect "nop", 
"~{dirflag},~{fpsr},~{flags}"()
+  // X86_64-O2-NOT:     ia_nsdialect
+  // X86_64-O2:         ret void
+  //
+  // I386-O0-LABEL:   define{{.*}} void @t27
+  // I386-O0:           call void asm sideeffect "nop", 
"~{dirflag},~{fpsr},~{flags}"()
+  // I386-O0-NOT:       ia_nsdialect
+  // I386-O0:           ret void
+  //
+  // I386-O2-LABEL:   define{{.*}} void @t27
+  // I386-O2:           call void asm sideeffect "nop", 
"~{dirflag},~{fpsr},~{flags}"()
+  // I386-O2-NOT:       ia_nsdialect
+  // I386-O2:           ret void
+  asm volatile ("nop");
 }
 
 // Check handling of '*' and '#' constraint modifiers.
-void t28(void)
-{
+void t28(void) {
+  // X86_64-O0-LABEL: define{{.*}} void @t28
+  // X86_64-O0:         call void asm sideeffect "/* $0 */", 
"i|r,~{dirflag},~{fpsr},~{flags}"(i32 1)
+  //
+  // X86_64-O2-LABEL: define{{.*}} void @t28
+  // X86_64-O2:         call void asm sideeffect "/* $0 */", 
"i|r,~{dirflag},~{fpsr},~{flags}"(i32 1)
+  //
+  // I386-O0-LABEL:   define{{.*}} void @t28
+  // I386-O0:           call void asm sideeffect "/* $0 */", 
"i|r,~{dirflag},~{fpsr},~{flags}"(i32 1)
+  //
+  // I386-O2-LABEL:   define{{.*}} void @t28
+  // I386-O2:           call void asm sideeffect "/* $0 */", 
"i|r,~{dirflag},~{fpsr},~{flags}"(i32 1)
   asm volatile ("/* %0 */" : : "i#*X,*r" (1));
-// CHECK: @t28
-// CHECK: call void asm sideeffect "/* $0 */", 
"i|r,~{dirflag},~{fpsr},~{flags}"(i32 1)
 }
 
 static unsigned t29_var[1];
 
 void t29(void) {
-  asm volatile("movl %%eax, %0"
-               :
-               : "m"(t29_var));
-  // CHECK: @t29
-  // CHECK: call void asm sideeffect "movl %eax, $0", 
"*m,~{dirflag},~{fpsr},~{flags}"(ptr elementtype([1 x i32]) @t29_var)
+  // X86_64-O0-LABEL: define{{.*}} void @t29
+  // X86_64-O0:         call void asm sideeffect "movl %eax, $0", 
"*m,~{dirflag},~{fpsr},~{flags}"
+  // X86_64-O0-SAME:      (ptr elementtype([1 x i32]) @t29_var)
+  //
+  // X86_64-O2-LABEL: define{{.*}} void @t29
+  // X86_64-O2:         call void asm sideeffect "movl %eax, $0", 
"*m,~{dirflag},~{fpsr},~{flags}"
+  // X86_64-O2-SAME:      (ptr nonnull elementtype([1 x i32]) @t29_var)
+  //
+  // I386-O0-LABEL:   define{{.*}} void @t29
+  // I386-O0:           call void asm sideeffect "movl %eax, $0", 
"*m,~{dirflag},~{fpsr},~{flags}"
+  // I386-O0-SAME:        (ptr elementtype([1 x i32]) @t29_var)
+  //
+  // I386-O2-LABEL:   define{{.*}} void @t29
+  // I386-O2:           call void asm sideeffect "movl %eax, $0", 
"*m,~{dirflag},~{fpsr},~{flags}"
+  // I386-O2-SAME:        (ptr nonnull elementtype([1 x i32]) @t29_var)
+  asm volatile ("movl %%eax, %0" : : "m" (t29_var));
 }
 
 void t30(int len) {
-  __asm__ volatile(""
-                   : "+&&rm"(len));
-  // CHECK: @t30
-  // CHECK: call void asm sideeffect "", "=*&rm,0,~{dirflag},~{fpsr},~{flags}"
+  // X86_64-O0-LABEL: define{{.*}} void @t30
+  // X86_64-O0:         call void asm sideeffect "", 
"=*&rm,0,~{dirflag},~{fpsr},~{flags}"
+  //
+  // X86_64-O2-LABEL: define{{.*}} void @t30
+  // X86_64-O2:         call void asm sideeffect "", 
"=*&rm,0,~{dirflag},~{fpsr},~{flags}"
+  //
+  // I386-O0-LABEL:   define{{.*}} void @t30
+  // I386-O0:           call void asm sideeffect "", 
"=*&rm,0,~{dirflag},~{fpsr},~{flags}"
+  //
+  // I386-O2-LABEL:   define{{.*}} void @t30
+  // I386-O2:           call void asm sideeffect "", 
"=*&rm,0,~{dirflag},~{fpsr},~{flags}"
+  __asm__ volatile ("" : "+&&rm" (len));
 }
 
 void t31(int len) {
-  __asm__ volatile(""
-                   : "+%%rm"(len), "+rm"(len));
-  // CHECK: @t31
-  // CHECK: call void asm sideeffect "", 
"=*%rm,=*rm,0,1,~{dirflag},~{fpsr},~{flags}"
-}
-
-// CHECK: @t32
-int t32(int cond)
-{
-  asm goto("testl %0, %0; jne %l1;" :: "r"(cond)::label_true, loop);
-  // CHECK: callbr void asm sideeffect "testl $0, $0; jne ${1:l};", 
"r,!i,!i,~{dirflag},~{fpsr},~{flags}"(i32 %0) #1
-  // CHECK-NEXT: to label %asm.fallthrough [label %label_true, label %loop]
+  // X86_64-O0-LABEL: define{{.*}} void @t31
+  // X86_64-O0:         call void asm sideeffect "", 
"=*%rm,=*rm,0,1,~{dirflag},~{fpsr},~{flags}"
+  //
+  // X86_64-O2-LABEL: define{{.*}} void @t31
+  // X86_64-O2:         call void asm sideeffect "", 
"=*%rm,=*rm,0,1,~{dirflag},~{fpsr},~{flags}"
+  //
+  // I386-O0-LABEL:   define{{.*}} void @t31
+  // I386-O0:           call void asm sideeffect "", 
"=*%rm,=*rm,0,1,~{dirflag},~{fpsr},~{flags}"
+  //
+  // I386-O2-LABEL:   define{{.*}} void @t31
+  // I386-O2:           call void asm sideeffect "", 
"=*%rm,=*rm,0,1,~{dirflag},~{fpsr},~{flags}"
+  __asm__ volatile("" : "+%%rm" (len), "+rm" (len));
+}
----------------
nickdesaulniers wrote:

FWICT, it seems like only:
- t10
- t30
- t31

have some combination of `r` and `m` constraints, relevant for 
https://github.com/llvm/llvm-project/pull/181973 . I didn't see any `g` 
constraints.  The other 31 test cases don't seem relevant enough to run 
multiple times IMO.

If so, then perhaps we can just pull those 3 test cases out of this file, put 
them in a new test file with multiple run lines, and a nice comment saying 
those cases are likely to change upon resolution of 
https://github.com/llvm/llvm-project/issues/20571?

https://github.com/llvm/llvm-project/pull/191944
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to