mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

This replaces the fsub -0.0 idiom with an fneg instruction. We didn't see to have a test that showed the current codegen. Just some tests for constant folding and a test that was only checking the declare lines for libcalls. The latter just checked that we did not have a declare for @conj when using __builtin_conj. Differential Revision: https://reviews.llvm.org/D72012
21 lines
683 B
C
21 lines
683 B
C
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -w -S -o - -emit-llvm %s | FileCheck %s
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -w -S -o - -emit-llvm -fmath-errno %s | FileCheck %s
|
|
|
|
float _Complex test__builtin_conjf(float _Complex x) {
|
|
// CHECK-LABEL: @test__builtin_conjf(
|
|
// CHECK: fneg float %x.imag
|
|
return __builtin_conjf(x);
|
|
}
|
|
|
|
double _Complex test__builtin_conj(double _Complex x) {
|
|
// CHECK-LABEL: @test__builtin_conj(
|
|
// CHECK: fneg double %x.imag
|
|
return __builtin_conj(x);
|
|
}
|
|
|
|
long double _Complex test__builtin_conjl(long double _Complex x) {
|
|
// CHECK-LABEL: @test__builtin_conjl(
|
|
// CHECK: fneg x86_fp80 %x.imag
|
|
return __builtin_conjl(x);
|
|
}
|