[llvm] r231037 - WinEH: Run opt -instnamer over some cppeh tests and update CHECKs

Reid Kleckner reid at kleckner.net
Mon Mar 2 16:05:35 PST 2015


Author: rnk
Date: Mon Mar  2 18:05:35 2015
New Revision: 231037

URL: http://llvm.org/viewvc/llvm-project?rev=231037&view=rev
Log:
WinEH: Run opt -instnamer over some cppeh tests and update CHECKs

In the future, we should run the output of clang through instnamer to
make it easier to manually edit test cases.

No functionality change.

Modified:
    llvm/trunk/test/CodeGen/X86/cppeh-catch-all.ll
    llvm/trunk/test/CodeGen/X86/cppeh-catch-scalar.ll
    llvm/trunk/test/CodeGen/X86/cppeh-frame-vars.ll

Modified: llvm/trunk/test/CodeGen/X86/cppeh-catch-all.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/cppeh-catch-all.ll?rev=231037&r1=231036&r2=231037&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/cppeh-catch-all.ll (original)
+++ llvm/trunk/test/CodeGen/X86/cppeh-catch-all.ll Mon Mar  2 18:05:35 2015
@@ -30,17 +30,17 @@ invoke.cont:
   br label %try.cont
 
 lpad:                                             ; preds = %entry
-  %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
           catch i8* null
-  %1 = extractvalue { i8*, i32 } %0, 0
-  store i8* %1, i8** %exn.slot
-  %2 = extractvalue { i8*, i32 } %0, 1
-  store i32 %2, i32* %ehselector.slot
+  %tmp1 = extractvalue { i8*, i32 } %tmp, 0
+  store i8* %tmp1, i8** %exn.slot
+  %tmp2 = extractvalue { i8*, i32 } %tmp, 1
+  store i32 %tmp2, i32* %ehselector.slot
   br label %catch
 
 catch:                                            ; preds = %lpad
   %exn = load i8*, i8** %exn.slot
-  %3 = call i8* @llvm.eh.begincatch(i8* %exn) #3
+  %tmp3 = call i8* @llvm.eh.begincatch(i8* %exn) #2
   call void @_Z16handle_exceptionv()
   br label %invoke.cont2
 

Modified: llvm/trunk/test/CodeGen/X86/cppeh-catch-scalar.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/cppeh-catch-scalar.ll?rev=231037&r1=231036&r2=231037&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/cppeh-catch-scalar.ll (original)
+++ llvm/trunk/test/CodeGen/X86/cppeh-catch-scalar.ll Mon Mar  2 18:05:35 2015
@@ -46,28 +46,28 @@ invoke.cont:
   br label %try.cont
 
 lpad:                                             ; preds = %entry
-  %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
           catch i8* bitcast (i8** @_ZTIi to i8*)
-  %1 = extractvalue { i8*, i32 } %0, 0
-  store i8* %1, i8** %exn.slot
-  %2 = extractvalue { i8*, i32 } %0, 1
-  store i32 %2, i32* %ehselector.slot
+  %tmp1 = extractvalue { i8*, i32 } %tmp, 0
+  store i8* %tmp1, i8** %exn.slot
+  %tmp2 = extractvalue { i8*, i32 } %tmp, 1
+  store i32 %tmp2, i32* %ehselector.slot
   br label %catch.dispatch
 
 catch.dispatch:                                   ; preds = %lpad
   %sel = load i32, i32* %ehselector.slot
-  %3 = call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) #3
-  %matches = icmp eq i32 %sel, %3
+  %tmp3 = call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) #3
+  %matches = icmp eq i32 %sel, %tmp3
   br i1 %matches, label %catch, label %eh.resume
 
 catch:                                            ; preds = %catch.dispatch
   %exn11 = load i8*, i8** %exn.slot
-  %4 = call i8* @llvm.eh.begincatch(i8* %exn11) #3
-  %5 = bitcast i8* %4 to i32*
-  %6 = load i32, i32* %5, align 4
-  store i32 %6, i32* %i, align 4
-  %7 = load i32, i32* %i, align 4
-  call void @_Z10handle_inti(i32 %7)
+  %tmp4 = call i8* @llvm.eh.begincatch(i8* %exn11) #3
+  %tmp5 = bitcast i8* %tmp4 to i32*
+  %tmp6 = load i32, i32* %tmp5, align 4
+  store i32 %tmp6, i32* %i, align 4
+  %tmp7 = load i32, i32* %i, align 4
+  call void @_Z10handle_inti(i32 %tmp7)
   br label %invoke.cont2
 
 invoke.cont2:                                     ; preds = %catch
@@ -85,18 +85,18 @@ eh.resume:
   resume { i8*, i32 } %lpad.val5
 }
 
-; CHECK: define i8* @_Z4testv.catch(i8*, i8*) {
+; CHECK-LABEL: define i8* @_Z4testv.catch(i8*, i8*) {
 ; CHECK: catch.entry:
 ; CHECK:   %eh.alloc = call i8* @llvm.framerecover(i8* bitcast (void ()* @_Z4testv to i8*), i8* %1)
 ; CHECK:   %eh.data = bitcast i8* %eh.alloc to %struct._Z4testv.ehdata*
 ; CHECK:   %eh.obj.ptr = getelementptr inbounds %struct._Z4testv.ehdata, %struct._Z4testv.ehdata* %eh.data, i32 0, i32 1
 ; CHECK:   %eh.obj = load i8*, i8** %eh.obj.ptr
 ; CHECK:   %i = getelementptr inbounds %struct._Z4testv.ehdata, %struct._Z4testv.ehdata* %eh.data, i32 0, i32 2
-; CHECK:   %2 = bitcast i8* %eh.obj to i32*
-; CHECK:   %3 = load i32, i32* %2, align 4
-; CHECK:   store i32 %3, i32* %i, align 4
-; CHECK:   %4 = load i32, i32* %i, align 4
-; CHECK:   call void @_Z10handle_inti(i32 %4)
+; CHECK:   %tmp5 = bitcast i8* %eh.obj to i32*
+; CHECK:   %tmp6 = load i32, i32* %tmp5, align 4
+; CHECK:   store i32 %tmp6, i32* %i, align 4
+; CHECK:   %tmp7 = load i32, i32* %i, align 4
+; CHECK:   call void @_Z10handle_inti(i32 %tmp7)
 ; CHECK:   ret i8* blockaddress(@_Z4testv, %try.cont)
 ; CHECK: }
 

Modified: llvm/trunk/test/CodeGen/X86/cppeh-frame-vars.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/cppeh-frame-vars.ll?rev=231037&r1=231036&r2=231037&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/cppeh-frame-vars.ll (original)
+++ llvm/trunk/test/CodeGen/X86/cppeh-frame-vars.ll Mon Mar  2 18:05:35 2015
@@ -6,16 +6,16 @@
 ;   int a;
 ;   int b;
 ; };
-; 
+;
 ; void may_throw();
 ; void does_not_throw(int i);
 ; void dump(int *, int, SomeData&);
-; 
+;
 ; void test() {
 ;   int NumExceptions = 0;
 ;   int ExceptionVal[10];
 ;   SomeData Data = { 0, 0 };
-; 
+;
 ;   for (int i = 0; i < 10; ++i) {
 ;     try {
 ;       may_throw();
@@ -77,14 +77,14 @@ entry:
   %ehselector.slot = alloca i32
   %e = alloca i32, align 4
   store i32 0, i32* %NumExceptions, align 4
-  %0 = bitcast %struct.SomeData* %Data to i8*
-  call void @llvm.memset(i8* %0, i8 0, i64 8, i32 4, i1 false)
+  %tmp = bitcast %struct.SomeData* %Data to i8*
+  call void @llvm.memset(i8* %tmp, i8 0, i64 8, i32 4, i1 false)
   store i32 0, i32* %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %entry
-  %1 = load i32, i32* %i, align 4
-  %cmp = icmp slt i32 %1, 10
+  %tmp1 = load i32, i32* %i, align 4
+  %cmp = icmp slt i32 %tmp1, 10
   br i1 %cmp, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
@@ -92,60 +92,60 @@ for.body:
           to label %invoke.cont unwind label %lpad
 
 invoke.cont:                                      ; preds = %for.body
-  %2 = load i32, i32* %i, align 4
+  %tmp2 = load i32, i32* %i, align 4
   %a = getelementptr inbounds %struct.SomeData, %struct.SomeData* %Data, i32 0, i32 0
-  %3 = load i32, i32* %a, align 4
-  %add = add nsw i32 %3, %2
+  %tmp3 = load i32, i32* %a, align 4
+  %add = add nsw i32 %tmp3, %tmp2
   store i32 %add, i32* %a, align 4
   br label %try.cont
 
 lpad:                                             ; preds = %for.body
-  %4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %tmp4 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
           catch i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*)
-  %5 = extractvalue { i8*, i32 } %4, 0
-  store i8* %5, i8** %exn.slot
-  %6 = extractvalue { i8*, i32 } %4, 1
-  store i32 %6, i32* %ehselector.slot
+  %tmp5 = extractvalue { i8*, i32 } %tmp4, 0
+  store i8* %tmp5, i8** %exn.slot
+  %tmp6 = extractvalue { i8*, i32 } %tmp4, 1
+  store i32 %tmp6, i32* %ehselector.slot
   br label %catch.dispatch
 
 catch.dispatch:                                   ; preds = %lpad
   %sel = load i32, i32* %ehselector.slot
-  %7 = call i32 @llvm.eh.typeid.for(i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*)) #1
-  %matches = icmp eq i32 %sel, %7
+  %tmp7 = call i32 @llvm.eh.typeid.for(i8* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H at 8" to i8*)) #1
+  %matches = icmp eq i32 %sel, %tmp7
   br i1 %matches, label %catch, label %eh.resume
 
 catch:                                            ; preds = %catch.dispatch
   %exn = load i8*, i8** %exn.slot
-  %8 = call i8* @llvm.eh.begincatch(i8* %exn) #1
-  %9 = bitcast i8* %8 to i32*
-  %10 = load i32, i32* %9, align 4
-  store i32 %10, i32* %e, align 4
-  %11 = load i32, i32* %e, align 4
-  %12 = load i32, i32* %NumExceptions, align 4
-  %idxprom = sext i32 %12 to i64
+  %tmp8 = call i8* @llvm.eh.begincatch(i8* %exn) #1
+  %tmp9 = bitcast i8* %tmp8 to i32*
+  %tmp10 = load i32, i32* %tmp9, align 4
+  store i32 %tmp10, i32* %e, align 4
+  %tmp11 = load i32, i32* %e, align 4
+  %tmp12 = load i32, i32* %NumExceptions, align 4
+  %idxprom = sext i32 %tmp12 to i64
   %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %ExceptionVal, i32 0, i64 %idxprom
-  store i32 %11, i32* %arrayidx, align 4
-  %13 = load i32, i32* %NumExceptions, align 4
-  %inc = add nsw i32 %13, 1
+  store i32 %tmp11, i32* %arrayidx, align 4
+  %tmp13 = load i32, i32* %NumExceptions, align 4
+  %inc = add nsw i32 %tmp13, 1
   store i32 %inc, i32* %NumExceptions, align 4
-  %14 = load i32, i32* %e, align 4
-  %15 = load i32, i32* %i, align 4
-  %cmp1 = icmp eq i32 %14, %15
+  %tmp14 = load i32, i32* %e, align 4
+  %tmp15 = load i32, i32* %i, align 4
+  %cmp1 = icmp eq i32 %tmp14, %tmp15
   br i1 %cmp1, label %if.then, label %if.else
 
 if.then:                                          ; preds = %catch
-  %16 = load i32, i32* %e, align 4
+  %tmp16 = load i32, i32* %e, align 4
   %b = getelementptr inbounds %struct.SomeData, %struct.SomeData* %Data, i32 0, i32 1
-  %17 = load i32, i32* %b, align 4
-  %add2 = add nsw i32 %17, %16
+  %tmp17 = load i32, i32* %b, align 4
+  %add2 = add nsw i32 %tmp17, %tmp16
   store i32 %add2, i32* %b, align 4
   br label %if.end
 
 if.else:                                          ; preds = %catch
-  %18 = load i32, i32* %e, align 4
+  %tmp18 = load i32, i32* %e, align 4
   %a3 = getelementptr inbounds %struct.SomeData, %struct.SomeData* %Data, i32 0, i32 0
-  %19 = load i32, i32* %a3, align 4
-  %add4 = add nsw i32 %19, %18
+  %tmp19 = load i32, i32* %a3, align 4
+  %add4 = add nsw i32 %tmp19, %tmp18
   store i32 %add4, i32* %a3, align 4
   br label %if.end
 
@@ -154,20 +154,20 @@ if.end:
   br label %try.cont
 
 try.cont:                                         ; preds = %if.end, %invoke.cont
-  %20 = load i32, i32* %NumExceptions, align 4
-  call void @"\01?does_not_throw@@YAXH at Z"(i32 %20)
+  %tmp20 = load i32, i32* %NumExceptions, align 4
+  call void @"\01?does_not_throw@@YAXH at Z"(i32 %tmp20)
   br label %for.inc
 
 for.inc:                                          ; preds = %try.cont
-  %21 = load i32, i32* %i, align 4
-  %inc5 = add nsw i32 %21, 1
+  %tmp21 = load i32, i32* %i, align 4
+  %inc5 = add nsw i32 %tmp21, 1
   store i32 %inc5, i32* %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %22 = load i32, i32* %NumExceptions, align 4
+  %tmp22 = load i32, i32* %NumExceptions, align 4
   %arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %ExceptionVal, i32 0, i32 0
-  call void @"\01?dump@@YAXPEAHHAEAUSomeData@@@Z"(i32* %arraydecay, i32 %22, %struct.SomeData* dereferenceable(8) %Data)
+  call void @"\01?dump@@YAXPEAHHAEAUSomeData@@@Z"(i32* %arraydecay, i32 %tmp22, %struct.SomeData* dereferenceable(8) %Data)
   ret void
 
 eh.resume:                                        ; preds = %catch.dispatch
@@ -179,7 +179,7 @@ eh.resume:
 }
 
 ; The following catch handler should be outlined.
-; CHECK: define i8* @"\01?test@@YAXXZ.catch"(i8*, i8*) {
+; CHECK-LABEL: define i8* @"\01?test@@YAXXZ.catch"(i8*, i8*) {
 ; CHECK: catch.entry:
 ; CHECK:   %eh.alloc = call i8* @llvm.framerecover(i8* bitcast (void ()* @"\01?test@@YAXXZ" to i8*), i8* %1)
 ; CHECK:   %eh.data = bitcast i8* %eh.alloc to %"struct.\01?test@@YAXXZ.ehdata"*
@@ -190,35 +190,35 @@ eh.resume:
 ; CHECK:   %ExceptionVal = getelementptr inbounds %"struct.\01?test@@YAXXZ.ehdata", %"struct.\01?test@@YAXXZ.ehdata"* %eh.data, i32 0, i32 4
 ; CHECK:   %i = getelementptr inbounds %"struct.\01?test@@YAXXZ.ehdata", %"struct.\01?test@@YAXXZ.ehdata"* %eh.data, i32 0, i32 5
 ; CHECK:   %Data = getelementptr inbounds %"struct.\01?test@@YAXXZ.ehdata", %"struct.\01?test@@YAXXZ.ehdata"* %eh.data, i32 0, i32 6
-; CHECK:   %2 = bitcast i8* %eh.obj to i32*
-; CHECK:   %3 = load i32, i32* %2, align 4
-; CHECK:   store i32 %3, i32* %e, align 4
-; CHECK:   %4 = load i32, i32* %e, align 4
-; CHECK:   %5 = load i32, i32* %NumExceptions, align 4
-; CHECK:   %idxprom = sext i32 %5 to i64
+; CHECK:   %tmp9 = bitcast i8* %eh.obj to i32*
+; CHECK:   %tmp10 = load i32, i32* %tmp9, align 4
+; CHECK:   store i32 %tmp10, i32* %e, align 4
+; CHECK:   %tmp11 = load i32, i32* %e, align 4
+; CHECK:   %tmp12 = load i32, i32* %NumExceptions, align 4
+; CHECK:   %idxprom = sext i32 %tmp12 to i64
 ; CHECK:   %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %ExceptionVal, i32 0, i64 %idxprom
-; CHECK:   store i32 %4, i32* %arrayidx, align 4
-; CHECK:   %6 = load i32, i32* %NumExceptions, align 4
-; CHECK:   %inc = add nsw i32 %6, 1
+; CHECK:   store i32 %tmp11, i32* %arrayidx, align 4
+; CHECK:   %tmp13 = load i32, i32* %NumExceptions, align 4
+; CHECK:   %inc = add nsw i32 %tmp13, 1
 ; CHECK:   store i32 %inc, i32* %NumExceptions, align 4
-; CHECK:   %7 = load i32, i32* %e, align 4
-; CHECK:   %8 = load i32, i32* %i, align 4
-; CHECK:   %cmp1 = icmp eq i32 %7, %8
+; CHECK:   %tmp14 = load i32, i32* %e, align 4
+; CHECK:   %tmp15 = load i32, i32* %i, align 4
+; CHECK:   %cmp1 = icmp eq i32 %tmp14, %tmp15
 ; CHECK:   br i1 %cmp1, label %if.then, label %if.else
 ;
 ; CHECK: if.then:                                          ; preds = %catch.entry
-; CHECK:   %9 = load i32, i32* %e, align 4
+; CHECK:   %tmp16 = load i32, i32* %e, align 4
 ; CHECK:   %b = getelementptr inbounds %struct.SomeData, %struct.SomeData* %Data, i32 0, i32 1
-; CHECK:   %10 = load i32, i32* %b, align 4
-; CHECK:   %add2 = add nsw i32 %10, %9
+; CHECK:   %tmp17 = load i32, i32* %b, align 4
+; CHECK:   %add2 = add nsw i32 %tmp17, %tmp16
 ; CHECK:   store i32 %add2, i32* %b, align 4
 ; CHECK:   br label %if.end
 ;
 ; CHECK: if.else:                                          ; preds = %catch.entry
-; CHECK:   %11 = load i32, i32* %e, align 4
+; CHECK:   %tmp18 = load i32, i32* %e, align 4
 ; CHECK:   %a3 = getelementptr inbounds %struct.SomeData, %struct.SomeData* %Data, i32 0, i32 0
-; CHECK:   %12 = load i32, i32* %a3, align 4
-; CHECK:   %add4 = add nsw i32 %12, %11
+; CHECK:   %tmp19 = load i32, i32* %a3, align 4
+; CHECK:   %add4 = add nsw i32 %tmp19, %tmp18
 ; CHECK:   store i32 %add4, i32* %a3, align 4
 ; CHECK:   br label %if.end
 ;





More information about the llvm-commits mailing list