| OLD | NEW |
| 1 ; RUN: llc < %s -mtriple=i686-linux -x86-asm-syntax=intel | FileCheck %s | 1 ; RUN: llc < %s -mtriple=i686-linux -x86-asm-syntax=intel | FileCheck %s |
| 2 ; RUN: llc < %s -mtriple=x86_64-linux -x86-asm-syntax=intel | FileCheck %s | 2 ; RUN: llc < %s -mtriple=x86_64-linux -x86-asm-syntax=intel | FileCheck %s |
| 3 ; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -x86-asm-syntax=intel | FileCheck %
s | 3 ; RUN: llc < %s -mtriple=x86_64-linux-gnux32 -x86-asm-syntax=intel | FileCheck %
s |
| 4 ; RUN: llc < %s -mtriple=x86_64-nacl -x86-asm-syntax=intel | FileCheck %s | 4 ; RUN: llc < %s -mtriple=x86_64-nacl -x86-asm-syntax=intel | FileCheck %s |
| 5 | 5 |
| 6 define i32 @test1(i32 %A, i32 %B) { | 6 define i32 @test1(i32 %A, i32 %B) { |
| 7 %tmp1 = shl i32 %A, 2 | 7 %tmp1 = shl i32 %A, 2 |
| 8 %tmp3 = add i32 %B, -5 | 8 %tmp3 = add i32 %B, -5 |
| 9 %tmp4 = add i32 %tmp3, %tmp1 | 9 %tmp4 = add i32 %tmp3, %tmp1 |
| 10 ; The above computation of %tmp4 should match a single lea, without using | 10 ; The above computation of %tmp4 should match a single lea, without using |
| 11 ; actual add instructions. | 11 ; actual add instructions. |
| 12 ; CHECK-NOT: add | 12 ; @LOCALMOD: The original regex would match ".dwarf_addr_size 4". |
| 13 ; CHECK-NOT: add{{.*}}, |
| 13 ; CHECK: lea {{[a-z]+}}, dword ptr [{{[a-z]+}} + 4*{{[a-z]+}} - 5] | 14 ; CHECK: lea {{[a-z]+}}, dword ptr [{{[a-z]+}} + 4*{{[a-z]+}} - 5] |
| 14 | 15 |
| 15 ret i32 %tmp4 | 16 ret i32 %tmp4 |
| 16 } | 17 } |
| 17 | 18 |
| 18 | 19 |
| OLD | NEW |