llvm-project/llvm/test/CodeGen/X86/GlobalISel
Reid Kleckner 7adb2fdbba Revert "Correct dwarf unwind information in function epilogue for X86"
This reverts r317579, originally committed as r317100.

There is a design issue with marking CFI instructions duplicatable. Not
all targets support the CFIInstrInserter pass, and targets like Darwin
can't cope with duplicated prologue setup CFI instructions. The compact
unwind info emission fails.

When the following code is compiled for arm64 on Mac at -O3, the CFI
instructions end up getting tail duplicated, which causes compact unwind
info emission to fail:
  int a, c, d, e, f, g, h, i, j, k, l, m;
  void n(int o, int *b) {
    if (g)
      f = 0;
    for (; f < o; f++) {
      m = a;
      if (l > j * k > i)
        j = i = k = d;
      h = b[c] - e;
    }
  }

We get assembly that looks like this:
; BB#1:                                 ; %if.then
Lloh3:
	adrp	x9, _f@GOTPAGE
Lloh4:
	ldr	x9, [x9, _f@GOTPAGEOFF]
	mov	 w8, wzr
Lloh5:
	str		wzr, [x9]
	stp	x20, x19, [sp, #-16]!   ; 8-byte Folded Spill
	.cfi_def_cfa_offset 16
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	cmp		w8, w0
	b.lt	LBB0_3
	b	LBB0_7
LBB0_2:                                 ; %entry.if.end_crit_edge
Lloh6:
	adrp	x8, _f@GOTPAGE
Lloh7:
	ldr	x8, [x8, _f@GOTPAGEOFF]
Lloh8:
	ldr		w8, [x8]
	stp	x20, x19, [sp, #-16]!   ; 8-byte Folded Spill
	.cfi_def_cfa_offset 16
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	cmp		w8, w0
	b.ge	LBB0_7
LBB0_3:                                 ; %for.body.lr.ph

Note the multiple .cfi_def* directives. Compact unwind info emission
can't handle that.

llvm-svn: 317726
2017-11-08 21:31:14 +00:00
..
GV.ll [GlobalISel][X86] Support G_GLOBAL_VALUE operation. 2017-07-02 08:58:29 +00:00
add-scalar.ll Revert "Correct dwarf unwind information in function epilogue for X86" 2017-11-08 21:31:14 +00:00
add-vec.ll [GlobalISel][X86] Support vector type G_UNMERGE_VALUES selection. 2017-07-02 08:15:49 +00:00
and-scalar.ll [GlobalISel][X86] Legalize i1 G_ADD/G_SUB/G_MUL/G_XOR/G_OR/G_AND instructions. 2017-09-17 11:34:17 +00:00
binop.ll
br.ll
brcond.ll Revert "Correct dwarf unwind information in function epilogue for X86" 2017-11-08 21:31:14 +00:00
callingconv.ll Revert "Correct dwarf unwind information in function epilogue for X86" 2017-11-08 21:31:14 +00:00
cmp.ll
constant.ll [GlobalISel][X86] fix %ptr(p0) = G_CONSTANT selection. 2017-07-03 11:06:54 +00:00
ext-x86-64.ll [GISel]: Fix generation of illegal COPYs during CallLowering 2017-10-09 20:07:43 +00:00
ext.ll [GlobalISel][X86] extend G_ZEXT support. 2017-07-10 09:07:34 +00:00
fadd-scalar.ll [GlobalISel][X86] Add fp32/62 legalizer, regbank-select, selection tests for G_FADD, G_FSUB, G_FMUL, G_FDIV. NFC. 2017-06-27 07:01:54 +00:00
fconstant.ll [GlobalISel][X86] G_FCONSTANT support. 2017-09-17 08:08:13 +00:00
fdiv-scalar.ll [GlobalISel][X86] Add fp32/62 legalizer, regbank-select, selection tests for G_FADD, G_FSUB, G_FMUL, G_FDIV. NFC. 2017-06-27 07:01:54 +00:00
fmul-scalar.ll [GlobalISel][X86] Add fp32/62 legalizer, regbank-select, selection tests for G_FADD, G_FSUB, G_FMUL, G_FDIV. NFC. 2017-06-27 07:01:54 +00:00
fpext-scalar.ll [GlobalISel][X86] support G_FPEXT operation. 2017-09-13 09:05:23 +00:00
frameIndex.ll Revert "Correct dwarf unwind information in function epilogue for X86" 2017-11-08 21:31:14 +00:00
fsub-scalar.ll [GlobalISel][X86] Add fp32/62 legalizer, regbank-select, selection tests for G_FADD, G_FSUB, G_FMUL, G_FDIV. NFC. 2017-06-27 07:01:54 +00:00
gep.ll Revert r314886 "[X86] Improvement in CodeGen instruction selection for LEAs (re-applying post required revision changes.)" 2017-10-04 17:54:06 +00:00
irtranslator-callingconv.ll MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-GV.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-add-v128.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-add-v256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-add-v512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-add.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-and-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-brcond.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-cmp.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-constant.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-ext-x86-64.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-ext.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-fadd-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-fdiv-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-fmul-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-fpext-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-fsub-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-gep.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-insert-vec256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-insert-vec512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-memop-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-mul-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-mul-v128.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-mul-v256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-mul-v512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-or-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-phi.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-sub-v128.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-sub-v256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-sub-v512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-sub.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-trunc.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-undef.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
legalize-xor-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
lit.local.cfg
memop-scalar-x32.ll [GlobalISel][X86] Support G_LOAD/G_STORE i1. 2017-07-10 09:26:09 +00:00
memop-scalar.ll Revert r314886 "[X86] Improvement in CodeGen instruction selection for LEAs (re-applying post required revision changes.)" 2017-10-04 17:54:06 +00:00
memop-vec.ll
mul-scalar.ll
mul-vec.ll
or-scalar.ll [GlobalISel][X86] Legalize i1 G_ADD/G_SUB/G_MUL/G_XOR/G_OR/G_AND instructions. 2017-09-17 11:34:17 +00:00
phi.ll [GlobalISel][X86] G_PHI support. 2017-09-04 09:06:45 +00:00
regbankselect-AVX2.mir
regbankselect-AVX512.mir
regbankselect-X32.mir
regbankselect-X86_64.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-GV.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-add-v128.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-add-v256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-add-v512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-add-x32.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-add.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-and-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-blsi.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-blsr.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-br.mir
select-brcond.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-cmp.mir [MIRPrinter] Use %subreg.xxx syntax for subregister index operands 2017-11-06 21:46:06 +00:00
select-constant.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-copy.mir [MIRPrinter] Use %subreg.xxx syntax for subregister index operands 2017-11-06 21:46:06 +00:00
select-ext-x86-64.mir [MIRPrinter] Use %subreg.xxx syntax for subregister index operands 2017-11-06 21:46:06 +00:00
select-ext.mir [MIRPrinter] Use %subreg.xxx syntax for subregister index operands 2017-11-06 21:46:06 +00:00
select-extract-vec256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-extract-vec512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-fadd-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-fconstant.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-fdiv-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-fmul-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-fpext-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-frameIndex.mir
select-fsub-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-gep.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-inc.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-insert-vec256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-insert-vec512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-intrinsic-x86-flags-read-u32.mir [MIRPrinter] Use %subreg.xxx syntax for subregister index operands 2017-11-06 21:46:06 +00:00
select-leaf-constant.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-memop-scalar-x32.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-memop-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-memop-v128.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-memop-v256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-memop-v512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-merge-vec256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-merge-vec512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-mul-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-mul-vec.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-or-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-phi.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-sub-v128.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-sub-v256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-sub-v512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-sub.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-trunc.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-undef.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-unmerge-vec256.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-unmerge-vec512.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
select-xor-scalar.mir MIR: Print the register class or bank in vreg defs 2017-10-24 18:04:54 +00:00
sub-scalar.ll [GlobalISel][X86] Legalize i1 G_ADD/G_SUB/G_MUL/G_XOR/G_OR/G_AND instructions. 2017-09-17 11:34:17 +00:00
sub-vec.ll
trunc.ll
undef.ll [GlobalISel][X86] Support G_IMPLICIT_DEF. 2017-08-24 07:06:27 +00:00
x86_64-fallback.ll [GlobalISel][X86] LowerCall, for now don't handel ByValue function arguments. 2017-08-21 08:59:59 +00:00
xor-scalar.ll [GlobalISel][X86] Legalize i1 G_ADD/G_SUB/G_MUL/G_XOR/G_OR/G_AND instructions. 2017-09-17 11:34:17 +00:00