2019-10-07 14:50:56 +08:00
|
|
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
2017-05-18 16:11:50 +08:00
|
|
|
# RUN: llc -run-pass x86-fixup-LEAs -mtriple=i386 -verify-machineinstrs -mcpu=corei7-avx -o - %s | FileCheck %s
|
|
|
|
--- |
|
|
|
|
; ModuleID = 'test/CodeGen/X86/fixup-lea.ll'
|
|
|
|
source_filename = "test/CodeGen/X86/fixup-lea.ll"
|
|
|
|
target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
|
|
|
|
target triple = "i386"
|
|
|
|
;generated using: llc -stop-after x86-pad-short-functions fixup-lea.ll > leaFinxup32.mir
|
|
|
|
|
|
|
|
;test2add_32: 3 operands LEA32r that can be replaced with 2 add instructions
|
|
|
|
; where ADD32ri8 is chosen
|
|
|
|
define i32 @test2add_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
;test2add_ebp_32: 3 operands LEA32r that can be replaced with 2 add instructions
|
|
|
|
; where the base is rbp/r13/ebp register
|
|
|
|
define i32 @test2add_ebp_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
;test1add_ebp_32: 2 operands LEA32r where base register is ebp and can be replaced
|
|
|
|
; with an add instruction
|
|
|
|
define i32 @test1add_ebp_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
;testleaadd_32: 3 operands LEA32r that can be replaced with 1 lea 1 add instructions
|
|
|
|
define i32 @testleaadd_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
;testleaadd_ebp_32: 3 operands LEA32r that can be replaced with 1 lea 1 add instructions
|
|
|
|
; where the base is ebp register
|
|
|
|
define i32 @testleaadd_ebp_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
;test1lea_ebp_32: 2 operands LEA32r wher base register is rbp/r13/ebp and can be replaced
|
|
|
|
; with a lea instruction
|
|
|
|
define i32 @test1lea_ebp_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
2019-10-07 14:50:56 +08:00
|
|
|
|
2017-05-18 16:11:50 +08:00
|
|
|
;test2addi32_32: 3 operands LEA32r that can be replaced with 2 add instructions where ADD32ri32
|
|
|
|
; is chosen
|
|
|
|
define i32 @test2addi32_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
2019-10-07 14:50:56 +08:00
|
|
|
|
2017-05-18 16:11:50 +08:00
|
|
|
;test1mov1add_ebp_32: 2 operands LEA32r that can be replaced with 1 add 1 mov instructions
|
|
|
|
; where the base is rbp/r13/ebp register
|
|
|
|
define i32 @test1mov1add_ebp_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
;testleaadd_ebp_index_32: 3 operands LEA32r that can be replaced with 1 lea 1 add instructions
|
|
|
|
; where the base and the index are ebp register and there is offset
|
|
|
|
define i32 @testleaadd_ebp_index_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
;testleaadd_ebp_index2_32: 3 operands LEA32r that can be replaced with 1 lea 1 add instructions
|
|
|
|
; where the base and the index are ebp register and there is scale
|
|
|
|
define i32 @testleaadd_ebp_index2_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
2019-10-07 14:50:56 +08:00
|
|
|
|
2017-05-18 16:11:50 +08:00
|
|
|
;test_skip_opt_32: 3 operands LEA32r that can not be replaced with 2 instructions
|
|
|
|
define i32 @test_skip_opt_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
;test_skip_eflags_32: LEA32r that cannot be replaced since its not safe to clobber eflags
|
|
|
|
define i32 @test_skip_eflags_32() {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test2add_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$eax' }
|
|
|
|
- { reg: '$ebp' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: test2add_32
|
|
|
|
; CHECK: liveins: $eax, $ebp
|
|
|
|
; CHECK: $eax = ADD32rr $eax, $ebp, implicit-def $eflags
|
|
|
|
; CHECK: $eax = ADD32ri8 $eax, -5, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $eax
|
2018-02-01 06:04:26 +08:00
|
|
|
$eax = LEA32r killed $eax, 1, killed $ebp, -5, $noreg
|
|
|
|
RETQ $eax
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test2add_ebp_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$eax' }
|
|
|
|
- { reg: '$ebp' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: test2add_ebp_32
|
|
|
|
; CHECK: liveins: $eax, $ebp
|
|
|
|
; CHECK: $ebp = ADD32rr $ebp, $eax, implicit-def $eflags
|
|
|
|
; CHECK: $ebp = ADD32ri8 $ebp, -5, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $ebp
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebp = LEA32r killed $ebp, 1, killed $eax, -5, $noreg
|
|
|
|
RETQ $ebp
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test1add_ebp_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$eax' }
|
|
|
|
- { reg: '$ebp' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: test1add_ebp_32
|
|
|
|
; CHECK: liveins: $eax, $ebp
|
|
|
|
; CHECK: $ebp = ADD32rr $ebp, $eax, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $ebp
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebp = LEA32r killed $ebp, 1, killed $eax, 0, $noreg
|
|
|
|
RETQ $ebp
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: testleaadd_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$eax' }
|
|
|
|
- { reg: '$ebp' }
|
|
|
|
- { reg: '$ebx' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp, $esi
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: testleaadd_32
|
|
|
|
; CHECK: liveins: $eax, $ebp, $esi
|
|
|
|
; CHECK: $ebx = LEA32r killed $eax, 1, killed $ebp, 0, $noreg
|
|
|
|
; CHECK: $ebx = ADD32ri8 $ebx, -5, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $ebx
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebx = LEA32r killed $eax, 1, killed $ebp, -5, $noreg
|
|
|
|
RETQ $ebx
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: testleaadd_ebp_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$eax' }
|
|
|
|
- { reg: '$ebp' }
|
|
|
|
- { reg: '$ebx' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: testleaadd_ebp_32
|
|
|
|
; CHECK: liveins: $eax, $ebp
|
2018-02-01 06:04:26 +08:00
|
|
|
; CHECK: $ebx = LEA32r killed $eax, 1, killed $ebp, 0, $noreg
|
2019-10-07 14:50:56 +08:00
|
|
|
; CHECK: $ebx = ADD32ri8 $ebx, -5, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $ebx
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebx = LEA32r killed $ebp, 1, killed $eax, -5, $noreg
|
|
|
|
RETQ $ebx
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test1lea_ebp_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$eax' }
|
|
|
|
- { reg: '$ebp' }
|
|
|
|
- { reg: '$ebx' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: test1lea_ebp_32
|
|
|
|
; CHECK: liveins: $eax, $ebp
|
2018-02-01 06:04:26 +08:00
|
|
|
; CHECK: $ebx = LEA32r killed $eax, 1, killed $ebp, 0, $noreg
|
2019-10-07 14:50:56 +08:00
|
|
|
; CHECK: RETQ $ebx
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebx = LEA32r killed $ebp, 1, killed $eax, 0, $noreg
|
|
|
|
RETQ $ebx
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test2addi32_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$eax' }
|
|
|
|
- { reg: '$ebp' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: test2addi32_32
|
|
|
|
; CHECK: liveins: $eax, $ebp
|
|
|
|
; CHECK: $eax = ADD32rr $eax, $ebp, implicit-def $eflags
|
|
|
|
; CHECK: $eax = ADD32ri $eax, 129, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $eax
|
2018-02-01 06:04:26 +08:00
|
|
|
$eax = LEA32r killed $eax, 1, killed $ebp, 129, $noreg
|
|
|
|
RETQ $eax
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test1mov1add_ebp_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$eax' }
|
|
|
|
- { reg: '$ebx' }
|
|
|
|
- { reg: '$ebp' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp, $ebx
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: test1mov1add_ebp_32
|
|
|
|
; CHECK: liveins: $eax, $ebp, $ebx
|
|
|
|
; CHECK: $ebx = MOV32rr $ebp
|
|
|
|
; CHECK: $ebx = ADD32rr $ebx, $ebp, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $ebx
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebx = LEA32r killed $ebp, 1, $ebp, 0, $noreg
|
|
|
|
RETQ $ebx
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: testleaadd_ebp_index_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$ebx' }
|
|
|
|
- { reg: '$ebp' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp, $ebx
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: testleaadd_ebp_index_32
|
|
|
|
; CHECK: liveins: $eax, $ebp, $ebx
|
2018-02-01 06:04:26 +08:00
|
|
|
; CHECK: $ebx = LEA32r $noreg, 1, $ebp, 5, $noreg
|
2019-10-07 14:50:56 +08:00
|
|
|
; CHECK: $ebx = ADD32rr $ebx, $ebp, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $ebx
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebx = LEA32r $ebp, 1, $ebp, 5, $noreg
|
|
|
|
RETQ $ebx
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: testleaadd_ebp_index2_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$ebx' }
|
|
|
|
- { reg: '$ebp' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp, $ebx
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: testleaadd_ebp_index2_32
|
|
|
|
; CHECK: liveins: $eax, $ebp, $ebx
|
2018-02-01 06:04:26 +08:00
|
|
|
; CHECK: $ebx = LEA32r $noreg, 4, $ebp, 5, $noreg
|
2019-10-07 14:50:56 +08:00
|
|
|
; CHECK: $ebx = ADD32rr $ebx, $ebp, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $ebx
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebx = LEA32r $ebp, 4, $ebp, 5, $noreg
|
|
|
|
RETQ $ebx
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test_skip_opt_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$ebx' }
|
|
|
|
- { reg: '$ebp' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp, $ebx
|
2019-10-07 14:50:56 +08:00
|
|
|
|
|
|
|
; CHECK-LABEL: name: test_skip_opt_32
|
|
|
|
; CHECK: liveins: $eax, $ebp, $ebx
|
2018-02-01 06:04:26 +08:00
|
|
|
; CHECK: $ebp = LEA32r killed $ebp, 4, killed $ebp, 0, $noreg
|
2019-10-07 14:50:56 +08:00
|
|
|
; CHECK: RETQ $ebp
|
2018-02-01 06:04:26 +08:00
|
|
|
$ebp = LEA32r killed $ebp, 4, killed $ebp, 0, $noreg
|
|
|
|
RETQ $ebp
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: test_skip_eflags_32
|
[Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67433
llvm-svn: 371608
2019-09-11 19:16:48 +08:00
|
|
|
alignment: 16
|
2017-05-18 16:11:50 +08:00
|
|
|
exposesReturnsTwice: false
|
|
|
|
legalized: false
|
|
|
|
regBankSelected: false
|
|
|
|
selected: false
|
|
|
|
tracksRegLiveness: true
|
2019-10-07 14:50:56 +08:00
|
|
|
liveins:
|
2018-02-01 06:04:26 +08:00
|
|
|
- { reg: '$ebp' }
|
|
|
|
- { reg: '$eax' }
|
2019-10-07 14:50:56 +08:00
|
|
|
frameInfo:
|
2017-05-18 16:11:50 +08:00
|
|
|
isFrameAddressTaken: false
|
|
|
|
isReturnAddressTaken: false
|
|
|
|
hasStackMap: false
|
|
|
|
hasPatchPoint: false
|
|
|
|
stackSize: 0
|
|
|
|
offsetAdjustment: 0
|
|
|
|
maxAlignment: 0
|
|
|
|
adjustsStack: false
|
|
|
|
hasCalls: false
|
|
|
|
maxCallFrameSize: 0
|
|
|
|
hasOpaqueSPAdjustment: false
|
|
|
|
hasVAStart: false
|
|
|
|
hasMustTailInVarArgFunc: false
|
|
|
|
body: |
|
2019-10-07 14:50:56 +08:00
|
|
|
; CHECK-LABEL: name: test_skip_eflags_32
|
|
|
|
; CHECK: bb.0 (%ir-block.0):
|
|
|
|
; CHECK: successors: %bb.1(0x80000000)
|
|
|
|
; CHECK: liveins: $eax, $ebp, $ebx
|
|
|
|
; CHECK: CMP32rr $eax, killed $ebx, implicit-def $eflags
|
|
|
|
; CHECK: $ebx = LEA32r killed $eax, 4, killed $eax, 5, $noreg
|
|
|
|
; CHECK: JCC_1 %bb.1, 4, implicit $eflags
|
|
|
|
; CHECK: RETQ $ebx
|
|
|
|
; CHECK: bb.1:
|
|
|
|
; CHECK: liveins: $eax, $ebp, $ebx
|
|
|
|
; CHECK: $ebp = LEA32r killed $ebx, 4, killed $ebx, 0, $noreg
|
|
|
|
; CHECK: $ebp = ADD32ri8 $ebp, 5, implicit-def $eflags
|
|
|
|
; CHECK: RETQ $ebp
|
2017-05-18 16:11:50 +08:00
|
|
|
bb.0 (%ir-block.0):
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp, $ebx
|
2019-10-07 14:50:56 +08:00
|
|
|
|
2018-02-01 06:04:26 +08:00
|
|
|
CMP32rr $eax, killed $ebx, implicit-def $eflags
|
|
|
|
$ebx = LEA32r killed $eax, 4, killed $eax, 5, $noreg
|
[X86] Merge the different Jcc instructions for each condition code into single instructions that store the condition code as an operand.
Summary:
This avoids needing an isel pattern for each condition code. And it removes translation switches for converting between Jcc instructions and condition codes.
Now the printer, encoder and disassembler take care of converting the immediate. We use InstAliases to handle the assembly matching. But we print using the asm string in the instruction definition. The instruction itself is marked IsCodeGenOnly=1 to hide it from the assembly parser.
Reviewers: spatel, lebedev.ri, courbet, gchatelet, RKSimon
Reviewed By: RKSimon
Subscribers: MatzeB, qcolombet, eraman, hiraditya, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60228
llvm-svn: 357802
2019-04-06 03:28:09 +08:00
|
|
|
JCC_1 %bb.1, 4, implicit $eflags
|
2018-02-01 06:04:26 +08:00
|
|
|
RETQ $ebx
|
2017-05-18 16:11:50 +08:00
|
|
|
bb.1:
|
2018-02-01 06:04:26 +08:00
|
|
|
liveins: $eax, $ebp, $ebx
|
|
|
|
$ebp = LEA32r killed $ebx, 4, killed $ebx, 5, $noreg
|
|
|
|
RETQ $ebp
|
2017-05-18 16:11:50 +08:00
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
|
|
|
|
|