[llvm] 226ff45 - [X86] Generate checks for 2012-01-10-UndefExceptionEdge
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Sat May 6 07:21:48 PDT 2023
Author: Jay Foad
Date: 2023-05-06T15:16:54+01:00
New Revision: 226ff4521419dd57334dac5ec6701561d30ee25c
URL: https://github.com/llvm/llvm-project/commit/226ff4521419dd57334dac5ec6701561d30ee25c
DIFF: https://github.com/llvm/llvm-project/commit/226ff4521419dd57334dac5ec6701561d30ee25c.diff
LOG: [X86] Generate checks for 2012-01-10-UndefExceptionEdge
Also add -verify-machineinstrs to make it easier to catch a
MachineVerifier failure introduced by D149947.
Differential Revision: https://reviews.llvm.org/D149953
Added:
Modified:
llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll b/llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
index fd3c8e75444a..0fbac8c7303a 100644
--- a/llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
+++ b/llvm/test/CodeGen/X86/2012-01-10-UndefExceptionEdge.ll
@@ -1,4 +1,5 @@
-; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -frame-pointer=all
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
+; RUN: llc -simplifycfg-require-and-preserve-domtree=1 < %s -frame-pointer=all -verify-machineinstrs | FileCheck %s
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
target triple = "i386-apple-macosx10.7"
@@ -18,6 +19,136 @@ target triple = "i386-apple-macosx10.7"
declare void @llvm.memset.p0.i32(ptr nocapture, i8, i32, i1) nounwind
define void @f(ptr nocapture %arg, ptr nocapture %arg1, ptr nocapture %arg2, ptr nocapture %arg3, i32 %arg4, i32 %arg5) optsize ssp personality ptr @__gxx_personality_v0 {
+; CHECK-LABEL: f:
+; CHECK: ## %bb.0: ## %bb
+; CHECK-NEXT: pushl %ebp
+; CHECK-NEXT: .cfi_def_cfa_offset 8
+; CHECK-NEXT: .cfi_offset %ebp, -8
+; CHECK-NEXT: movl %esp, %ebp
+; CHECK-NEXT: .cfi_def_cfa_register %ebp
+; CHECK-NEXT: pushl %ebx
+; CHECK-NEXT: pushl %edi
+; CHECK-NEXT: pushl %esi
+; CHECK-NEXT: subl $28, %esp
+; CHECK-NEXT: .cfi_offset %esi, -20
+; CHECK-NEXT: .cfi_offset %edi, -16
+; CHECK-NEXT: .cfi_offset %ebx, -12
+; CHECK-NEXT: xorl %eax, %eax
+; CHECK-NEXT: xorl %edi, %edi
+; CHECK-NEXT: testb %al, %al
+; CHECK-NEXT: Ltmp0:
+; CHECK-NEXT: calll __Znam
+; CHECK-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) ## 4-byte Spill
+; CHECK-NEXT: Ltmp1:
+; CHECK-NEXT: ## %bb.1: ## %bb11
+; CHECK-NEXT: movb $1, %al
+; CHECK-NEXT: testb %al, %al
+; CHECK-NEXT: jne LBB0_2
+; CHECK-NEXT: ## %bb.7: ## %bb31
+; CHECK-NEXT: ## implicit-def: $esi
+; CHECK-NEXT: LBB0_8: ## %bb38
+; CHECK-NEXT: ## =>This Loop Header: Depth=1
+; CHECK-NEXT: ## Child Loop BB0_12 Depth 2
+; CHECK-NEXT: ## Child Loop BB0_15 Depth 3
+; CHECK-NEXT: ## Child Loop BB0_20 Depth 2
+; CHECK-NEXT: cmpl %eax, %esi
+; CHECK-NEXT: jle LBB0_6
+; CHECK-NEXT: ## %bb.9: ## %bb41
+; CHECK-NEXT: ## in Loop: Header=BB0_8 Depth=1
+; CHECK-NEXT: Ltmp2:
+; CHECK-NEXT: xorl %eax, %eax
+; CHECK-NEXT: movl %eax, {{[0-9]+}}(%esp)
+; CHECK-NEXT: movl %eax, {{[0-9]+}}(%esp)
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax ## 4-byte Reload
+; CHECK-NEXT: movl %eax, (%esp)
+; CHECK-NEXT: calll _Pjii
+; CHECK-NEXT: Ltmp3:
+; CHECK-NEXT: ## %bb.10: ## %bb42
+; CHECK-NEXT: ## in Loop: Header=BB0_8 Depth=1
+; CHECK-NEXT: xorl %eax, %eax
+; CHECK-NEXT: decl %eax
+; CHECK-NEXT: testl %eax, %eax
+; CHECK-NEXT: jne LBB0_17
+; CHECK-NEXT: ## %bb.11: ## %bb45.preheader
+; CHECK-NEXT: ## in Loop: Header=BB0_8 Depth=1
+; CHECK-NEXT: movl $255, %eax
+; CHECK-NEXT: LBB0_12: ## %bb45
+; CHECK-NEXT: ## Parent Loop BB0_8 Depth=1
+; CHECK-NEXT: ## => This Loop Header: Depth=2
+; CHECK-NEXT: ## Child Loop BB0_15 Depth 3
+; CHECK-NEXT: testl %eax, %eax
+; CHECK-NEXT: jns LBB0_18
+; CHECK-NEXT: ## %bb.13: ## %bb48
+; CHECK-NEXT: ## in Loop: Header=BB0_12 Depth=2
+; CHECK-NEXT: movb $1, %cl
+; CHECK-NEXT: testb %cl, %cl
+; CHECK-NEXT: jne LBB0_16
+; CHECK-NEXT: ## %bb.14: ## %bb49.preheader
+; CHECK-NEXT: ## in Loop: Header=BB0_12 Depth=2
+; CHECK-NEXT: xorl %ecx, %ecx
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %edx ## 4-byte Reload
+; CHECK-NEXT: movl %edi, %ebx
+; CHECK-NEXT: LBB0_15: ## %bb49
+; CHECK-NEXT: ## Parent Loop BB0_8 Depth=1
+; CHECK-NEXT: ## Parent Loop BB0_12 Depth=2
+; CHECK-NEXT: ## => This Inner Loop Header: Depth=3
+; CHECK-NEXT: incl %ecx
+; CHECK-NEXT: addl $4, %edx
+; CHECK-NEXT: decl %ebx
+; CHECK-NEXT: jne LBB0_15
+; CHECK-NEXT: LBB0_16: ## %bb57
+; CHECK-NEXT: ## in Loop: Header=BB0_12 Depth=2
+; CHECK-NEXT: decl %eax
+; CHECK-NEXT: jmp LBB0_12
+; CHECK-NEXT: LBB0_18: ## %bb59
+; CHECK-NEXT: ## in Loop: Header=BB0_8 Depth=1
+; CHECK-NEXT: movl $-4, %eax
+; CHECK-NEXT: movl %eax, {{[0-9]+}}(%esp)
+; CHECK-NEXT: movl $0, (%esp)
+; CHECK-NEXT: calll ___bzero
+; CHECK-NEXT: movb $1, %al
+; CHECK-NEXT: testb %al, %al
+; CHECK-NEXT: jne LBB0_21
+; CHECK-NEXT: ## %bb.19: ## %bb61.preheader
+; CHECK-NEXT: ## in Loop: Header=BB0_8 Depth=1
+; CHECK-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax ## 4-byte Reload
+; CHECK-NEXT: movl %edi, %ecx
+; CHECK-NEXT: LBB0_20: ## %bb61
+; CHECK-NEXT: ## Parent Loop BB0_8 Depth=1
+; CHECK-NEXT: ## => This Inner Loop Header: Depth=2
+; CHECK-NEXT: movl $0, (%eax)
+; CHECK-NEXT: addl $4, %eax
+; CHECK-NEXT: decl %ecx
+; CHECK-NEXT: jne LBB0_20
+; CHECK-NEXT: LBB0_21: ## %bb67
+; CHECK-NEXT: ## in Loop: Header=BB0_8 Depth=1
+; CHECK-NEXT: decl %esi
+; CHECK-NEXT: jmp LBB0_8
+; CHECK-NEXT: LBB0_17: ## %bb43
+; CHECK-NEXT: Ltmp5:
+; CHECK-NEXT: calll _OnOverFlow
+; CHECK-NEXT: Ltmp6:
+; CHECK-NEXT: jmp LBB0_3
+; CHECK-NEXT: LBB0_2: ## %bb29
+; CHECK-NEXT: Ltmp7:
+; CHECK-NEXT: calll _OnOverFlow
+; CHECK-NEXT: Ltmp8:
+; CHECK-NEXT: LBB0_3: ## %bb30
+; CHECK-NEXT: ud2
+; CHECK-NEXT: LBB0_4: ## %bb20.loopexit
+; CHECK-NEXT: Ltmp4:
+; CHECK-NEXT: jmp LBB0_6
+; CHECK-NEXT: LBB0_5: ## %bb20.loopexit.split-lp
+; CHECK-NEXT: Ltmp9:
+; CHECK-NEXT: LBB0_6: ## %bb23
+; CHECK-NEXT: cmpl $0, {{[-0-9]+}}(%e{{[sb]}}p) ## 4-byte Folded Reload
+; CHECK-NEXT: addl $28, %esp
+; CHECK-NEXT: popl %esi
+; CHECK-NEXT: popl %edi
+; CHECK-NEXT: popl %ebx
+; CHECK-NEXT: popl %ebp
+; CHECK-NEXT: retl
+; CHECK-NEXT: Lfunc_end0:
bb:
br i1 undef, label %bb6, label %bb7
More information about the llvm-commits
mailing list