[llvm] c7feb6b - [WinEH] Re-run stack coloring test for i686

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 27 15:27:58 PST 2020


Author: Reid Kleckner
Date: 2020-01-27T15:26:03-08:00
New Revision: c7feb6b36aa8dac3cd20ffb9ad5980693ea9916e

URL: https://github.com/llvm/llvm-project/commit/c7feb6b36aa8dac3cd20ffb9ad5980693ea9916e
DIFF: https://github.com/llvm/llvm-project/commit/c7feb6b36aa8dac3cd20ffb9ad5980693ea9916e.diff

LOG: [WinEH] Re-run stack coloring test for i686

This would've caught https://crbug.com/1045650, which resulted in the
revert of 7a8b0b1595e7dc878b48cf9bbaa652087a6895db.

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/catchpad-lifetime.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/catchpad-lifetime.ll b/llvm/test/CodeGen/X86/catchpad-lifetime.ll
index 8a6d4cbd271d..9a166420e73c 100644
--- a/llvm/test/CodeGen/X86/catchpad-lifetime.ll
+++ b/llvm/test/CodeGen/X86/catchpad-lifetime.ll
@@ -1,7 +1,5 @@
-; RUN: llc < %s | FileCheck %s
-
-target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
-target triple = "x86_64-pc-windows-msvc"
+; RUN: llc -mtriple=x86_64-windows-msvc < %s | FileCheck %s --check-prefix=X64
+; RUN: llc -mtriple=i686-windows-msvc < %s | FileCheck %s --check-prefix=X86
 
 declare void @throw()
 
@@ -17,15 +15,27 @@ entry:
   invoke void @throw()
           to label %unreachable unwind label %catch.dispatch
 
-; CHECK-LABEL: test1:
-; CHECK: movq  $0, -8(%rbp)
-; CHECK: callq throw
+; X64-LABEL: test1:
+; X64: movq  $0, -8(%rbp)
+; X64: callq throw
+
+; X86-LABEL: _test1:
+; X86: pushl   %ebp
+; X86: movl    %esp, %ebp
+; X86: pushl   %ebx
+; X86: pushl   %edi
+; X86: pushl   %esi
+; X86: subl    $24, %esp
+
+; X86: movl  $0, -32(%ebp)
+; X86: calll _throw
 
 catch.dispatch:                                   ; preds = %entry
   %cs = catchswitch within none [label %catch.pad] unwind to caller
 
 catch.pad:                                        ; preds = %catch.dispatch
   %cp = catchpad within %cs [i8* null, i32 0, i8** %alloca1]
+  %v = load volatile i8*, i8** %alloca1
   store volatile i8* null, i8** %alloca1
   %bc1 = bitcast i8** %alloca1 to i8*
   call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %bc1)
@@ -35,17 +45,27 @@ catch.pad:                                        ; preds = %catch.dispatch
   call void @llvm.trap()
   unreachable
 
-; CHECK-LABEL: "?catch$2@?0?test1 at 4HA"
-; CHECK: movq  $0, -8(%rbp)
-; CHECK: movq  $0, -8(%rbp)
-; CHECK: ud2
+; X64-LABEL: "?catch$2@?0?test1 at 4HA"
+; X64: movq  $0, -8(%rbp)
+; X64: movq  $0, -8(%rbp)
+; X64: ud2
+
+; X86-LABEL: "?catch$2@?0?test1 at 4HA"
+; X86: movl  $0, -32(%ebp)
+; X86: movl  $0, -32(%ebp)
+; X86: ud2
 
 unreachable:                                      ; preds = %entry
   unreachable
 }
 
-; CHECK-LABEL: $cppxdata$test1:
-; CHECK: .long   56                      # CatchObjOffset
+; X64-LABEL: $cppxdata$test1:
+; X64: .long   56                      # CatchObjOffset
+
+; -20 is 
diff erence between the end of the EH reg node stack object and the
+; catch object at EBP -32.
+; X86-LABEL: L__ehtable$test1:
+; X86: .long   -20                      # CatchObjOffset
 
 define void @test2() personality i32 (...)* @__CxxFrameHandler3 {
 entry:
@@ -55,9 +75,14 @@ entry:
   invoke void @throw()
           to label %unreachable unwind label %catch.dispatch
 
-; CHECK-LABEL: test2:
-; CHECK: movq  $0, -16(%rbp)
-; CHECK: callq throw
+; X64-LABEL: test2:
+; X64: movq  $0, -16(%rbp)
+; X64: callq throw
+
+; X86-LABEL: _test2:
+; X86: movl  $0, -32(%ebp)
+; X86: calll _throw
+
 
 catch.dispatch:                                   ; preds = %entry
   %cs = catchswitch within none [label %catch.pad] unwind to caller
@@ -73,17 +98,27 @@ catch.pad:                                        ; preds = %catch.dispatch
   call void @llvm.trap()
   unreachable
 
-; CHECK-LABEL: "?catch$2@?0?test2 at 4HA"
-; CHECK: movq  $0, -16(%rbp)
-; CHECK: movq  $0, -16(%rbp)
-; CHECK: ud2
+; X64-LABEL: "?catch$2@?0?test2 at 4HA"
+; X64: movq  $0, -16(%rbp)
+; X64: movq  $0, -16(%rbp)
+; X64: ud2
+
+; X86-LABEL: "?catch$2@?0?test2 at 4HA"
+; X86: movl  $0, -32(%ebp)
+; X86: movl  $0, -32(%ebp)
+; X86: ud2
+
 
 unreachable:                                      ; preds = %entry
   unreachable
 }
 
-; CHECK-LABEL: $cppxdata$test2:
-; CHECK: .long   0                       # CatchObjOffset
+; X64-LABEL: $cppxdata$test2:
+; X64: .long   0                       # CatchObjOffset
+
+
+; X86-LABEL: L__ehtable$test2:
+; X86: .long   0                       # CatchObjOffset
 
 
 ; Function Attrs: argmemonly nounwind


        


More information about the llvm-commits mailing list