bool RegisterBankInfo::PartialMapping::verify() const {
assert(RegBank && "Register bank not set");
assert(Length && "Empty mapping");
- assert((StartIdx < getHighBitIdx()) && "Overflow, switch to APInt?");
+ assert((StartIdx <= getHighBitIdx()) && "Overflow, switch to APInt?");
// Check if the minimum width fits into RegBank.
assert(RegBank->getSize() >= Length && "Register bank too small for Mask");
return true;
define void @test_constant_s32() { ret void }
define void @test_constant_p0() { ret void }
+ define void @test_icmp_s32() { ret void }
+ define void @test_icmp_p0() { ret void }
+
define void @test_frame_index_p0() {
%ptr0 = alloca i64
ret void
...
---
+# CHECK-LABEL: name: test_icmp_s32
+name: test_icmp_s32
+legalized: true
+# CHECK: registers:
+# CHECK: - { id: 0, class: gpr }
+# CHECK: - { id: 1, class: gpr }
+registers:
+ - { id: 0, class: _ }
+ - { id: 1, class: _ }
+body: |
+ bb.0:
+ liveins: %w0
+ ; CHECK: %0(s32) = COPY %w0
+ ; CHECK: %1(s1) = G_ICMP intpred(ne), %0(s32), %0
+ %0(s32) = COPY %w0
+ %1(s1) = G_ICMP intpred(ne), %0, %0
+...
+
+---
+# CHECK-LABEL: name: test_icmp_p0
+name: test_icmp_p0
+legalized: true
+# CHECK: registers:
+# CHECK: - { id: 0, class: gpr }
+# CHECK: - { id: 1, class: gpr }
+registers:
+ - { id: 0, class: _ }
+ - { id: 1, class: _ }
+body: |
+ bb.0:
+ liveins: %x0
+ ; CHECK: %0(p0) = COPY %x0
+ ; CHECK: %1(s1) = G_ICMP intpred(ne), %0(p0), %0
+ %0(p0) = COPY %x0
+ %1(s1) = G_ICMP intpred(ne), %0, %0
+...
+
+---
# CHECK-LABEL: name: test_frame_index_p0
name: test_frame_index_p0
legalized: true