| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 |
| ; RUN: opt -S -passes=instsimplify < %s | FileCheck %s |
| |
| define i60 @test1() { |
| ; CHECK-LABEL: define i60 @test1() { |
| ; CHECK-NEXT: ret i60 3 |
| ; |
| %fptoui = fptoui float 0x400D9999A0000000 to i60 |
| ret i60 %fptoui |
| } |
| |
| define float @test2() { |
| ; CHECK-LABEL: define float @test2() { |
| ; CHECK-NEXT: ret float 1.700000e+01 |
| ; |
| %uitofp = uitofp i60 17 to float |
| ret float %uitofp |
| } |
| |
| define i64 @test3() { |
| ; CHECK-LABEL: define i64 @test3() { |
| ; CHECK-NEXT: ret i64 4614256656431372362 |
| ; |
| ret i64 bitcast (double 0x400921FB4D12D84A to i64) |
| } |
| |
| define double @test4() { |
| ; CHECK-LABEL: define double @test4() { |
| ; CHECK-NEXT: ret double 2.075080e-322 |
| ; |
| ret double bitcast (i64 42 to double) |
| } |
| |
| define i30 @test5() { |
| ; CHECK-LABEL: define i30 @test5() { |
| ; CHECK-NEXT: ret i30 3 |
| ; |
| %fptoui = fptoui float 0x400D9999A0000000 to i30 |
| ret i30 %fptoui |
| } |
| |
| define float @test6() { |
| ; CHECK-LABEL: define float @test6() { |
| ; CHECK-NEXT: ret float 1.700000e+01 |
| ; |
| %uitofp = uitofp i30 17 to float |
| ret float %uitofp |
| } |
| |
| define i64 @test7() { |
| ; CHECK-LABEL: define i64 @test7() { |
| ; CHECK-NEXT: ret i64 4614256656431372362 |
| ; |
| ret i64 bitcast (double 0x400921FB4D12D84A to i64) |
| } |
| |
| define double @test8() { |
| ; CHECK-LABEL: define double @test8() { |
| ; CHECK-NEXT: ret double 2.075080e-322 |
| ; |
| ret double bitcast (i64 42 to double) |
| } |