[PATCH] ARM: Negative offset support problem (bug 20853 fix)

Renato Golin renato.golin at linaro.org
Mon Sep 8 09:43:29 PDT 2014


REPOSITORY
  rL LLVM

================
Comment at: test/CodeGen/ARM/negative-offset.ll:7
@@ +6,3 @@
+;CHECK-LABEL: sum:
+;CHECK: [r0, #-16]
+;CHECK: [r0, #-8]
----------------
better to CHECK for the whole instruction, and to use regular expressions, and maybe add an extra CHECK-NOT on sub, to be explicit about the reason of this test.

    ;CHECK-LABEL: sum:
    ;CHECK-NOT: sub
    ;CHECK: ldr r{{.*}}, [r0, #-16]
    ;CHECK: ldr r{{.*}}, [r0, #-8]

================
Comment at: test/CodeGen/ARM/negative-offset.ll:13
@@ +12,3 @@
+  %1 = load i32* %arrayidx1, align 4
+  %add = add nsw i32 %1, %0
+  %2 = load i32* %p, align 4
----------------
returning this add should be more than enough.

http://reviews.llvm.org/D5241






More information about the llvm-commits mailing list