[PATCH] D15707: [Thumb] Fix assembler error 'cannot honor width suffix pop {lr}'

Ana Pazos via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 13:27:37 PST 2015


apazos added a comment.

Here is a simplified test case for the tBcc case, we can add it to thumb-pop.ll or move them all to thumb-shrinkwrapping.ll.

; RUN: llc < %s -mtriple=thumbv5e-none-linux-gnueabi-eabi -verify-machineinstrs -o - | FileCheck %s
%struct.a = type { i8*, i32, i32, i8*, i32, i32, i8*, %struct.b*, i8* (i8*, i32, i32)*, void (i8*, i8*)*,
 i8*, i32, i32, i32 }
%struct.b = type opaque
%struct.c = type { i32, i32, i32, i32, i8*, i32, i32, i8*, i32, i8*, i32, i32, i32 }
%struct.e = type { i32, i32, i32, i32, i32, i32, i32, i32, %struct.c*, i32, i32, i32, i32, i8*, i32, i32,
 i32, i32, i32, %struct.f*, %struct.f*, i32, i32, i32, i32, i32, i32, %struct.f*, [320 x i16], [288 x i16
], [1444 x %struct.f], i32, i32, i32 }
%struct.f = type { i8, i8, i16 }

define i32 @test2(%struct.a* %v, %struct.c* %head) {
; CHECK-LABEL: test2:
; CHECK-NOT: pop {[[POP_REG:r[0-7]]], lr}
entry:

  %cmp = icmp eq %struct.a* %v, null
  br i1 %cmp, label %cleanup, label %if.end

if.end:                                           ; preds = %entry

  %state1 = getelementptr inbounds %struct.a, %struct.a* %v, i32 0, i32 7
  %0 = bitcast %struct.b** %state1 to %struct.e**
  %1 = load %struct.e*, %struct.e** %0, align 4
  %wrap = getelementptr inbounds %struct.e, %struct.e* %1, i32 0, i32 2
  %2 = load i32, i32* %wrap, align 4
  %and = and i32 %2, 2
  %cmp2 = icmp eq i32 %and, 0
  br i1 %cmp2, label %cleanup, label %if.end4

if.end4:                                          ; preds = %if.end

  %head5 = getelementptr inbounds %struct.e, %struct.e* %1, i32 0, i32 8
  store %struct.c* %head, %struct.c** %head5, align 4
  br label %cleanup

cleanup:                                          ; preds = %if.end, %entry, %if.end4

  %retval.0 = phi i32 [ 0, %if.end4 ], [ -2, %entry ], [ -2, %if.end ]
  ret i32 %retval.0

}


http://reviews.llvm.org/D15707





More information about the llvm-commits mailing list