1; RUN: llc -mtriple=i686-unknown-linux-gnu -march=x86-64 -mcpu=x86-64 < %s | FileCheck %s 2 3; Make sure the float conversion is folded away as it should be. 4; CHECK-LABEL: foo 5; CHECK-NOT: cvt 6; CHECK: movzbl 7define i32 @foo(i8 %a) #0 { 8 %conv = uitofp i8 %a to float 9 %conv1 = fptosi float %conv to i32 10 ret i32 %conv1 11} 12 13; CHECK-LABEL: foo2 14; CHECK-NOT: cvt 15; CHECK: movsbl 16define i32 @foo2(i8 %a) #0 { 17 %conv = sitofp i8 %a to float 18 %conv1 = fptosi float %conv to i32 19 ret i32 %conv1 20} 21 22; CHECK-LABEL: bar 23; CHECK-NOT: cvt 24; CHECK: movl 25define zeroext i8 @bar(i8 zeroext %a) #0 { 26 %conv = uitofp i8 %a to float 27 %conv1 = fptoui float %conv to i8 28 ret i8 %conv1 29} 30 31attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } 32 33