15 lines · plain
1// RUN: mlir-opt --arith-emulate-wide-int="widest-int-supported=32" --canonicalize %s | FileCheck %s2 3// Check that we can fold away the 'hi' part calculation when it is know to be zero.4//5// CHECK-LABEL: func @uitofp_i16_ext_f646// CHECK-SAME: ([[ARG:%.+]]: i16) -> f647// CHECK-NEXT: [[EXT:%.+]] = arith.extui [[ARG]] : i16 to i328// CHECK-NEXT: [[FP:%.+]] = arith.uitofp [[EXT]] : i32 to f649// CHECK-NEXT: return [[FP]] : f6410func.func @uitofp_i16_ext_f64(%a : i16) -> f64 {11 %ext = arith.extui %a : i16 to i6412 %r = arith.uitofp %ext : i64 to f6413 return %r : f6414}15