brintos

brintos / llvm-project-archived public Read only

0
0
Text · 530 B · 4e07c62 Raw
18 lines · plain
1; RUN: llc < %s | FileCheck %s2 3target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"4target triple = "aarch64"5 6; If the float value is negative or too large, the result is undefined anyway;7; otherwise, fcvtzs must returns a value in [0, 256), which guarantees zext.8 9; CHECK-LABEL: float_char_int_func:10; CHECK: fcvtzs [[A:w[0-9]+]], s011; CHECK-NEXT: ret12define i32 @float_char_int_func(float %infloatVal) {13entry:14  %conv = fptoui float %infloatVal to i815  %conv1 = zext i8 %conv to i3216  ret i32 %conv117}18