| OLD | NEW | 
|    1 ; Tests various aspects of i1 related lowering. |    1 ; Tests various aspects of i1 related lowering. | 
|    2  |    2  | 
|    3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |    3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 
|    4 ; RUN:   --target x8632 -i %s --args -O2 \ |    4 ; RUN:   --target x8632 -i %s --args -O2 \ | 
|    5 ; RUN:   | %if --need=target_X8632 --command FileCheck %s |    5 ; RUN:   | %if --need=target_X8632 --command FileCheck %s | 
|    6  |    6  | 
|    7 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |    7 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 
|    8 ; RUN:   --target x8632 -i %s --args -Om1 \ |    8 ; RUN:   --target x8632 -i %s --args -Om1 \ | 
|    9 ; RUN:   | %if --need=target_X8632 --command FileCheck %s |    9 ; RUN:   | %if --need=target_X8632 --command FileCheck %s | 
|   10  |   10  | 
|   11 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) |   11 ; TODO(jvoung): Stop skipping unimplemented parts (via --skip-unimplemented) | 
|   12 ; once enough infrastructure is in. Also, switch to --filetype=obj |   12 ; once enough infrastructure is in. Also, switch to --filetype=obj | 
|   13 ; when possible. |   13 ; when possible. | 
|   14 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ |   14 ; RUN: %if --need=target_ARM32 --need=allow_dump \ | 
 |   15 ; RUN:   --command %p2i --filetype=asm --assemble \ | 
|   15 ; RUN:   --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ |   16 ; RUN:   --disassemble --target arm32 -i %s --args -O2 --skip-unimplemented \ | 
|   16 ; RUN:   | %if --need=target_ARM32 --command FileCheck --check-prefix ARM32 %s |   17 ; RUN:   | %if --need=target_ARM32 --need=allow_dump \ | 
|   17 ; RUN: %if --need=target_ARM32 --command %p2i --filetype=asm --assemble \ |   18 ; RUN:   --command FileCheck --check-prefix ARM32 %s | 
 |   19 ; RUN: %if --need=target_ARM32 --need=allow_dump \ | 
 |   20 ; RUN:   --command %p2i --filetype=asm --assemble \ | 
|   18 ; RUN:   --disassemble --target arm32 -i %s --args -Om1 --skip-unimplemented \ |   21 ; RUN:   --disassemble --target arm32 -i %s --args -Om1 --skip-unimplemented \ | 
|   19 ; RUN:   | %if --need=target_ARM32 --command FileCheck --check-prefix ARM32 %s |   22 ; RUN:   | %if --need=target_ARM32 --need=allow_dump \ | 
 |   23 ; RUN:   --command FileCheck --check-prefix ARM32 %s | 
|   20  |   24  | 
|   21 ; TODO(jvoung): test this. |   25 ; TODO(jvoung): test this. | 
|   22  |   26  | 
|   23 ; Test that and with true uses immediate 1, not -1. |   27 ; Test that and with true uses immediate 1, not -1. | 
|   24 define internal i32 @testAndTrue(i32 %arg) { |   28 define internal i32 @testAndTrue(i32 %arg) { | 
|   25 entry: |   29 entry: | 
|   26   %arg_i1 = trunc i32 %arg to i1 |   30   %arg_i1 = trunc i32 %arg to i1 | 
|   27   %result_i1 = and i1 %arg_i1, true |   31   %result_i1 = and i1 %arg_i1, true | 
|   28   %result = zext i1 %result_i1 to i32 |   32   %result = zext i1 %result_i1 to i32 | 
|   29   ret i32 %result |   33   ret i32 %result | 
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  278   %arg_i1 = fptosi double %arg to i1 |  282   %arg_i1 = fptosi double %arg to i1 | 
|  279   %result = sext i1 %arg_i1 to i32 |  283   %result = sext i1 %arg_i1 to i32 | 
|  280   ret i32 %result |  284   ret i32 %result | 
|  281 } |  285 } | 
|  282 ; CHECK-LABEL: testFptosiDouble |  286 ; CHECK-LABEL: testFptosiDouble | 
|  283 ; CHECK: cvttsd2si |  287 ; CHECK: cvttsd2si | 
|  284 ; CHECK: and {{.*}},0x1 |  288 ; CHECK: and {{.*}},0x1 | 
|  285 ; CHECK: movzx [[REG:.*]], |  289 ; CHECK: movzx [[REG:.*]], | 
|  286 ; CHECK-NEXT: shl [[REG]],0x1f |  290 ; CHECK-NEXT: shl [[REG]],0x1f | 
|  287 ; CHECK-NEXT: sar [[REG]],0x1f |  291 ; CHECK-NEXT: sar [[REG]],0x1f | 
| OLD | NEW |