OLD | NEW |
(Empty) | |
| 1 ; Tests local-cse on x8632 and x8664 |
| 2 |
| 3 ; RUN: %p2i -i %s --filetype=obj --disassemble --target x8632 --args \ |
| 4 ; RUN: -O2 -enable-experimental | FileCheck --check-prefix=X8632 \ |
| 5 ; RUN: --check-prefix=X8632EXP %s |
| 6 |
| 7 ; RUN: %p2i -i %s --filetype=obj --disassemble --target x8632 --args \ |
| 8 ; RUN: -O2 | FileCheck --check-prefix=X8632 --check-prefix X8632NOEXP %s |
| 9 |
| 10 ; RUN: %p2i -i %s --filetype=obj --disassemble --target x8664 --args \ |
| 11 ; RUN: -O2 -enable-experimental | FileCheck --check-prefix=X8664 \ |
| 12 ; RUN: --check-prefix=X8664EXP %s |
| 13 |
| 14 ; RUN: %p2i -i %s --filetype=obj --disassemble --target x8664 --args \ |
| 15 ; RUN: -O2 | FileCheck --check-prefix=X8664 --check-prefix X8664NOEXP %s |
| 16 |
| 17 |
| 18 define internal i32 @local_cse_test(i32 %a, i32 %b) { |
| 19 entry: |
| 20 %add1 = add i32 %b, %a |
| 21 %add2 = add i32 %b, %a |
| 22 %add3 = add i32 %add1, %add2 |
| 23 ret i32 %add3 |
| 24 } |
| 25 |
| 26 ; X8632: add |
| 27 ; X8632: add |
| 28 ; X8632NOEXP: add |
| 29 ; X8632EXP-NOT: add |
| 30 ; X8632: ret |
| 31 |
| 32 ; X8664: add |
| 33 ; X8664: add |
| 34 ; X8664NOEXP: add |
| 35 ; X8664EXP-NOT: add |
| 36 ; X8664: ret |
OLD | NEW |