Skip to content

Commit 7848145

Browse files
committed
remove simd_fpow and simd_fpowi
1 parent 9ebb68d commit 7848145

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

src/intrinsic/simd.rs

+8-20
Original file line numberDiff line numberDiff line change
@@ -772,8 +772,6 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
772772
sym::simd_floor => "floor",
773773
sym::simd_fma => "fma",
774774
sym::simd_relaxed_fma => "fma", // FIXME: this should relax to non-fused multiply-add when necessary
775-
sym::simd_fpowi => "__builtin_powi",
776-
sym::simd_fpow => "pow",
777775
sym::simd_fsin => "sin",
778776
sym::simd_fsqrt => "sqrt",
779777
sym::simd_round => "round",
@@ -788,24 +786,16 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
788786
let mut vector_elements = vec![];
789787
for i in 0..in_len {
790788
let index = bx.context.new_rvalue_from_long(bx.ulong_type, i as i64);
791-
// we have to treat fpowi specially, since fpowi's second argument is always an i32
792789
let mut arguments = vec![];
793-
if name == sym::simd_fpowi {
794-
arguments = vec![
795-
bx.extract_element(args[0].immediate(), index).to_rvalue(),
796-
args[1].immediate(),
797-
];
798-
} else {
799-
for arg in args {
800-
let mut element = bx.extract_element(arg.immediate(), index).to_rvalue();
801-
// FIXME: it would probably be better to not have casts here and use the proper
802-
// instructions.
803-
if let Some(typ) = cast_type {
804-
element = bx.context.new_cast(None, element, typ);
805-
}
806-
arguments.push(element);
790+
for arg in args {
791+
let mut element = bx.extract_element(arg.immediate(), index).to_rvalue();
792+
// FIXME: it would probably be better to not have casts here and use the proper
793+
// instructions.
794+
if let Some(typ) = cast_type {
795+
element = bx.context.new_cast(None, element, typ);
807796
}
808-
};
797+
arguments.push(element);
798+
}
809799
let mut result = bx.context.new_call(None, function, &arguments);
810800
if cast_type.is_some() {
811801
result = bx.context.new_cast(None, result, elem_ty);
@@ -829,8 +819,6 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
829819
| sym::simd_floor
830820
| sym::simd_fma
831821
| sym::simd_relaxed_fma
832-
| sym::simd_fpow
833-
| sym::simd_fpowi
834822
| sym::simd_fsin
835823
| sym::simd_fsqrt
836824
| sym::simd_round

0 commit comments

Comments
 (0)