blob: c1eeea7a82e54a6271bd99d8f4fe64263bbbb47c [file] [log] [blame]
Eric Christophercee313d2019-04-17 04:52:47 +00001; RUN: opt < %s -float2int -S | FileCheck %s
2;
3; Verify that pass float2int is not run on optnone functions.
4
5define i16 @simple1(i8 %a) #0 {
6; CHECK-LABEL: @simple1
7; CHECK: %1 = uitofp i8 %a to float
8; CHECK-NEXT: %2 = fadd float %1, 1.0
9; CHECK-NEXT: %3 = fptoui float %2 to i16
10; CHECK-NEXT: ret i16 %3
11 %1 = uitofp i8 %a to float
12 %2 = fadd float %1, 1.0
13 %3 = fptoui float %2 to i16
14 ret i16 %3
15}
16
17attributes #0 = { noinline optnone }