float2int-optnone.ll 449 B

1234567891011121314151617
  1. ; RUN: opt < %s -float2int -S | FileCheck %s
  2. ;
  3. ; Verify that pass float2int is not run on optnone functions.
  4. define i16 @simple1(i8 %a) #0 {
  5. ; CHECK-LABEL: @simple1
  6. ; CHECK: %1 = uitofp i8 %a to float
  7. ; CHECK-NEXT: %2 = fadd float %1, 1.0
  8. ; CHECK-NEXT: %3 = fptoui float %2 to i16
  9. ; CHECK-NEXT: ret i16 %3
  10. %1 = uitofp i8 %a to float
  11. %2 = fadd float %1, 1.0
  12. %3 = fptoui float %2 to i16
  13. ret i16 %3
  14. }
  15. attributes #0 = { noinline optnone }