[ARM] Improve testcase for r283323
authorJames Molloy <james.molloy@arm.com>
Thu, 6 Oct 2016 07:44:05 +0000 (07:44 +0000)
committerJames Molloy <james.molloy@arm.com>
Thu, 6 Oct 2016 07:44:05 +0000 (07:44 +0000)
We can work around a shortcoming of FileCheck by using {{\[}} to match a square
bracket before a [[ sequence.

Thanks to Eli Friedman for the heads up!

llvm-svn: 283422

llvm/test/CodeGen/ARM/constantpool-promote-ldrh.ll

index 5d9a31a..9e369dc 100644 (file)
@@ -9,8 +9,7 @@ target triple = "thumbv6m-arm-linux-gnueabi"
 ; CHECK-LABEL: fn1:
 ; CHECK: adr [[base:r[0-9]+]], .LCPI0_0
 ; CHECK-NOT: ldrh {{r[0-9]+}}, .LCPI0_0
-; FIXME: We want to use [[base]] below instead of "r0", but the preceding square bracket confuses FileCheck.
-; CHECK: ldrh r{{[0-9]+}}, [r0]
+; CHECK: ldrh r{{[0-9]+}}, {{\[}}[[base]]]
 define hidden i32 @fn1() #0 {
 entry:
   call void @llvm.memcpy.p0i8.p0i8.i32(i8* undef, i8* bitcast ([4 x i16]* @fn1.a to i8*), i32 8, i32 2, i1 false)