2018-03-14 09:11:23 +00:00
|
|
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
2018-05-05 21:19:59 +00:00
|
|
|
# RUN: llc -mtriple=x86_64-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
|
2018-03-14 09:11:23 +00:00
|
|
|
|
|
|
|
--- |
|
|
|
|
|
|
|
|
define i8 @zext_i1_to_i8(i1 %val) {
|
|
|
|
%res = zext i1 %val to i8
|
|
|
|
ret i8 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i16 @zext_i1_to_i16(i1 %val) {
|
|
|
|
%res = zext i1 %val to i16
|
|
|
|
ret i16 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @zext_i1_to_i32(i1 %val) {
|
|
|
|
%res = zext i1 %val to i32
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @zext_i1_to_i64(i1 %val) {
|
|
|
|
%res = zext i1 %val to i64
|
|
|
|
ret i64 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i16 @zext_i8_to_i16(i8 %val) {
|
|
|
|
%res = zext i8 %val to i16
|
|
|
|
ret i16 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @zext_i8_to_i32(i8 %val) {
|
|
|
|
%res = zext i8 %val to i32
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @zext_i8_to_i64(i8 %val) {
|
|
|
|
%res = zext i8 %val to i64
|
|
|
|
ret i64 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @zext_i16_to_i32(i16 %val) {
|
|
|
|
%res = zext i16 %val to i32
|
|
|
|
ret i32 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @zext_i16_to_i64(i16 %val) {
|
|
|
|
%res = zext i16 %val to i64
|
|
|
|
ret i64 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @zext_i32_to_i64(i32 %val) {
|
|
|
|
%res = zext i32 %val to i64
|
|
|
|
ret i64 %res
|
|
|
|
}
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i1_to_i8
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
- { id: 2, class: gpr }
|
|
|
|
- { id: 3, class: gpr }
|
|
|
|
- { id: 4, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i1_to_i8
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
|
|
|
; CHECK: [[COPY1:%[0-9]+]]:gr8 = COPY [[COPY]].sub_8bit
|
|
|
|
; CHECK: [[AND8ri:%[0-9]+]]:gr8 = AND8ri [[COPY1]], 1, implicit-def $eflags
|
|
|
|
; CHECK: $al = COPY [[AND8ri]]
|
|
|
|
; CHECK: RET 0, implicit $al
|
|
|
|
%1:gpr(s32) = COPY $edi
|
|
|
|
%3:gpr(s8) = G_CONSTANT i8 1
|
|
|
|
%4:gpr(s8) = G_TRUNC %1(s32)
|
|
|
|
%2:gpr(s8) = G_AND %4, %3
|
|
|
|
$al = COPY %2(s8)
|
|
|
|
RET 0, implicit $al
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i1_to_i16
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
- { id: 2, class: gpr }
|
|
|
|
- { id: 3, class: gpr }
|
|
|
|
- { id: 4, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i1_to_i16
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
|
|
|
; CHECK: [[COPY1:%[0-9]+]]:gr16 = COPY [[COPY]].sub_16bit
|
|
|
|
; CHECK: [[AND16ri8_:%[0-9]+]]:gr16 = AND16ri8 [[COPY1]], 1, implicit-def $eflags
|
|
|
|
; CHECK: $ax = COPY [[AND16ri8_]]
|
|
|
|
; CHECK: RET 0, implicit $ax
|
|
|
|
%1:gpr(s32) = COPY $edi
|
|
|
|
%3:gpr(s16) = G_CONSTANT i16 1
|
|
|
|
%4:gpr(s16) = G_TRUNC %1(s32)
|
|
|
|
%2:gpr(s16) = G_AND %4, %3
|
|
|
|
$ax = COPY %2(s16)
|
|
|
|
RET 0, implicit $ax
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i1_to_i32
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
- { id: 2, class: gpr }
|
|
|
|
- { id: 3, class: gpr }
|
|
|
|
- { id: 4, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i1_to_i32
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
|
|
|
; CHECK: [[AND32ri8_:%[0-9]+]]:gr32 = AND32ri8 [[COPY]], 1, implicit-def $eflags
|
|
|
|
; CHECK: $eax = COPY [[AND32ri8_]]
|
|
|
|
; CHECK: RET 0, implicit $eax
|
|
|
|
%1:gpr(s32) = COPY $edi
|
|
|
|
%3:gpr(s32) = G_CONSTANT i32 1
|
|
|
|
%4:gpr(s32) = COPY %1(s32)
|
|
|
|
%2:gpr(s32) = G_AND %4, %3
|
|
|
|
$eax = COPY %2(s32)
|
|
|
|
RET 0, implicit $eax
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i1_to_i64
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
- { id: 2, class: gpr }
|
|
|
|
- { id: 3, class: gpr }
|
|
|
|
- { id: 4, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i1_to_i64
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
2019-08-27 17:47:06 +00:00
|
|
|
; CHECK: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
|
|
|
|
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gr64 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.sub_32bit
|
|
|
|
; CHECK: [[AND64ri8_:%[0-9]+]]:gr64 = AND64ri8 [[INSERT_SUBREG]], 1, implicit-def $eflags
|
2018-03-14 09:11:23 +00:00
|
|
|
; CHECK: $rax = COPY [[AND64ri8_]]
|
|
|
|
; CHECK: RET 0, implicit $rax
|
|
|
|
%1:gpr(s32) = COPY $edi
|
|
|
|
%3:gpr(s64) = G_CONSTANT i64 1
|
|
|
|
%4:gpr(s64) = G_ANYEXT %1(s32)
|
|
|
|
%2:gpr(s64) = G_AND %4, %3
|
|
|
|
$rax = COPY %2(s64)
|
|
|
|
RET 0, implicit $rax
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i8_to_i16
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
- { id: 2, class: gpr }
|
|
|
|
- { id: 3, class: gpr }
|
|
|
|
- { id: 4, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i8_to_i16
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
|
|
|
; CHECK: [[COPY1:%[0-9]+]]:gr16 = COPY [[COPY]].sub_16bit
|
2020-01-14 16:02:02 -05:00
|
|
|
; CHECK: [[COPY2:%[0-9]+]]:gr8 = COPY [[COPY1]].sub_8bit
|
|
|
|
; CHECK: [[MOVZX32rr8_:%[0-9]+]]:gr32 = MOVZX32rr8 [[COPY2]]
|
|
|
|
; CHECK: [[COPY3:%[0-9]+]]:gr16 = COPY [[MOVZX32rr8_]].sub_16bit
|
|
|
|
; CHECK: $ax = COPY [[COPY3]]
|
2018-03-14 09:11:23 +00:00
|
|
|
; CHECK: RET 0, implicit $ax
|
|
|
|
%1:gpr(s32) = COPY $edi
|
|
|
|
%3:gpr(s16) = G_CONSTANT i16 255
|
|
|
|
%4:gpr(s16) = G_TRUNC %1(s32)
|
|
|
|
%2:gpr(s16) = G_AND %4, %3
|
|
|
|
$ax = COPY %2(s16)
|
|
|
|
RET 0, implicit $ax
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i8_to_i32
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
- { id: 2, class: gpr }
|
|
|
|
- { id: 3, class: gpr }
|
|
|
|
- { id: 4, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i8_to_i32
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
|
|
|
; CHECK: [[COPY1:%[0-9]+]]:gr8 = COPY [[COPY]].sub_8bit
|
|
|
|
; CHECK: [[MOVZX32rr8_:%[0-9]+]]:gr32 = MOVZX32rr8 [[COPY1]]
|
|
|
|
; CHECK: $eax = COPY [[MOVZX32rr8_]]
|
|
|
|
; CHECK: RET 0, implicit $eax
|
|
|
|
%1:gpr(s32) = COPY $edi
|
|
|
|
%3:gpr(s32) = G_CONSTANT i32 255
|
|
|
|
%4:gpr(s32) = COPY %1(s32)
|
|
|
|
%2:gpr(s32) = G_AND %4, %3
|
|
|
|
$eax = COPY %2(s32)
|
|
|
|
RET 0, implicit $eax
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i8_to_i64
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
- { id: 2, class: gpr }
|
|
|
|
- { id: 3, class: gpr }
|
|
|
|
- { id: 4, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i8_to_i64
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
2019-08-27 17:47:06 +00:00
|
|
|
; CHECK: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
|
|
|
|
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gr64 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.sub_32bit
|
|
|
|
; CHECK: [[AND64ri32_:%[0-9]+]]:gr64 = AND64ri32 [[INSERT_SUBREG]], 255, implicit-def $eflags
|
2018-03-14 09:11:23 +00:00
|
|
|
; CHECK: $rax = COPY [[AND64ri32_]]
|
|
|
|
; CHECK: RET 0, implicit $rax
|
|
|
|
%1:gpr(s32) = COPY $edi
|
|
|
|
%3:gpr(s64) = G_CONSTANT i64 255
|
|
|
|
%4:gpr(s64) = G_ANYEXT %1(s32)
|
|
|
|
%2:gpr(s64) = G_AND %4, %3
|
|
|
|
$rax = COPY %2(s64)
|
|
|
|
RET 0, implicit $rax
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i16_to_i32
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
- { id: 2, class: gpr }
|
|
|
|
- { id: 3, class: gpr }
|
|
|
|
- { id: 4, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i16_to_i32
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
|
|
|
; CHECK: [[COPY1:%[0-9]+]]:gr16 = COPY [[COPY]].sub_16bit
|
|
|
|
; CHECK: [[MOVZX32rr16_:%[0-9]+]]:gr32 = MOVZX32rr16 [[COPY1]]
|
|
|
|
; CHECK: $eax = COPY [[MOVZX32rr16_]]
|
|
|
|
; CHECK: RET 0, implicit $eax
|
|
|
|
%1:gpr(s32) = COPY $edi
|
|
|
|
%3:gpr(s32) = G_CONSTANT i32 65535
|
|
|
|
%4:gpr(s32) = COPY %1(s32)
|
|
|
|
%2:gpr(s32) = G_AND %4, %3
|
|
|
|
$eax = COPY %2(s32)
|
|
|
|
RET 0, implicit $eax
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i16_to_i64
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: _ }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
- { id: 2, class: gpr }
|
|
|
|
- { id: 3, class: gpr }
|
|
|
|
- { id: 4, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i16_to_i64
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
2019-08-27 17:47:06 +00:00
|
|
|
; CHECK: [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
|
|
|
|
; CHECK: [[INSERT_SUBREG:%[0-9]+]]:gr64 = INSERT_SUBREG [[DEF]], [[COPY]], %subreg.sub_32bit
|
|
|
|
; CHECK: [[AND64ri32_:%[0-9]+]]:gr64 = AND64ri32 [[INSERT_SUBREG]], 65535, implicit-def $eflags
|
2018-03-14 09:11:23 +00:00
|
|
|
; CHECK: $rax = COPY [[AND64ri32_]]
|
|
|
|
; CHECK: RET 0, implicit $rax
|
|
|
|
%1:gpr(s32) = COPY $edi
|
|
|
|
%3:gpr(s64) = G_CONSTANT i64 65535
|
|
|
|
%4:gpr(s64) = G_ANYEXT %1(s32)
|
|
|
|
%2:gpr(s64) = G_AND %4, %3
|
|
|
|
$rax = COPY %2(s64)
|
|
|
|
RET 0, implicit $rax
|
|
|
|
|
|
|
|
...
|
|
|
|
---
|
|
|
|
name: zext_i32_to_i64
|
[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 11:16:48 +00:00
|
|
|
alignment: 16
|
2018-03-14 09:11:23 +00:00
|
|
|
legalized: true
|
|
|
|
regBankSelected: true
|
|
|
|
tracksRegLiveness: true
|
|
|
|
registers:
|
|
|
|
- { id: 0, class: gpr }
|
|
|
|
- { id: 1, class: gpr }
|
|
|
|
body: |
|
|
|
|
bb.1 (%ir-block.0):
|
|
|
|
liveins: $edi
|
|
|
|
|
|
|
|
; CHECK-LABEL: name: zext_i32_to_i64
|
|
|
|
; CHECK: liveins: $edi
|
|
|
|
; CHECK: [[COPY:%[0-9]+]]:gr32 = COPY $edi
|
2019-08-28 20:12:31 +00:00
|
|
|
; CHECK: [[MOV32rr:%[0-9]+]]:gr32 = MOV32rr [[COPY]]
|
|
|
|
; CHECK: [[SUBREG_TO_REG:%[0-9]+]]:gr64 = SUBREG_TO_REG 0, [[MOV32rr]], %subreg.sub_32bit
|
2018-03-14 09:11:23 +00:00
|
|
|
; CHECK: $rax = COPY [[SUBREG_TO_REG]]
|
|
|
|
; CHECK: RET 0, implicit $rax
|
|
|
|
%0:gpr(s32) = COPY $edi
|
|
|
|
%1:gpr(s64) = G_ZEXT %0(s32)
|
|
|
|
$rax = COPY %1(s64)
|
|
|
|
RET 0, implicit $rax
|
|
|
|
|
|
|
|
...
|