github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,c -- 
compiler-rt/lib/builtins/arm/fcmp.h compiler-rt/lib/builtins/arm/thumb1/fcmp.h 
compiler-rt/test/builtins/Unit/comparesf2new_test.c --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/lib/builtins/arm/fcmp.h 
b/compiler-rt/lib/builtins/arm/fcmp.h
index 23bdd73a1..72344f8b3 100644
--- a/compiler-rt/lib/builtins/arm/fcmp.h
+++ b/compiler-rt/lib/builtins/arm/fcmp.h
@@ -48,127 +48,125 @@
 //  - if the 8 exponent bits of the output are not all 1, then there are
 //    definitely no NaNs, so a fast path can handle most non-NaN cases.
 
-  // First diverge control for the negative-numbers case.
-  orrs    r12, op0, op1
-  bmi     LOCAL_LABEL(negative)         // high bit set => at least one 
negative input
+// First diverge control for the negative-numbers case.
+orrs r12, op0,
+    op1 bmi LOCAL_LABEL(negative) // high bit set => at least one negative 
input
 
-  // Here, both inputs are positive. Try adding 1<<23 to their bitwise OR in
-  // r12. This will carry all the way into the top bit, setting the N flag, if
-  // all 8 exponent bits were set.
-  cmn     r12, #1 << 23
-  bmi     LOCAL_LABEL(NaNInf_check_positive) // need to look harder for NaNs
+// Here, both inputs are positive. Try adding 1<<23 to their bitwise OR in
+// r12. This will carry all the way into the top bit, setting the N flag, if
+// all 8 exponent bits were set.
+cmn r12, #1 << 23 bmi LOCAL_LABEL(
+             NaNInf_check_positive) // need to look harder for NaNs
 
-  // The fastest fast path: both inputs positive and we could easily tell there
-  // were no NaNs. So we just compare op0 and op1 as unsigned integers.
-  cmp     op0, op1
-  SetReturnRegister
-  bx      lr
+// The fastest fast path: both inputs positive and we could easily tell there
+// were no NaNs. So we just compare op0 and op1 as unsigned integers.
+cmp op0,
+    op1 SetReturnRegister bx lr
 
-LOCAL_LABEL(NaNInf_check_positive):
-  // Second tier for positive numbers. We come here if both inputs are
-  // positive, but our fast initial check didn't manage to rule out a NaN. But
-  // it's not guaranteed that there _is_ a NaN, for two reasons:
-  //
-  //  1. An input with exponent 0xFF might be an infinity instead. Those behave
-  //    normally under comparison.
-  //
-  //  2. There might not even _be_ an input with exponent 0xFF. All we know so
-  //     far is that the two inputs ORed together had all the exponent bits
-  //     set. So each of those bits is set in _at least one_ of the inputs, but
-  //     not necessarily all in the _same_ input.
-  //
-  // Test each exponent individually for 0xFF, using the same CMN idiom as
-  // above. If neither one carries into the sign bit then we have no NaNs _or_
-  // infinities and can compare the registers and return again.
-  cmn     op0, #1 << 23
-  cmnpl   op1, #1 << 23
-  bmi     LOCAL_LABEL(NaN_check_positive)
+    LOCAL_LABEL(NaNInf_check_positive)
+    : // Second tier for positive numbers. We come here if both inputs are
+      // positive, but our fast initial check didn't manage to rule out a NaN.
+      // But it's not guaranteed that there _is_ a NaN, for two reasons:
+      //
+      //  1. An input with exponent 0xFF might be an infinity instead. Those
+      //  behave
+      //    normally under comparison.
+      //
+      //  2. There might not even _be_ an input with exponent 0xFF. All we know
+      //  so
+      //     far is that the two inputs ORed together had all the exponent bits
+      //     set. So each of those bits is set in _at least one_ of the inputs,
+      //     but not necessarily all in the _same_ input.
+      //
+      // Test each exponent individually for 0xFF, using the same CMN idiom as
+      // above. If neither one carries into the sign bit then we have no NaNs
+      // _or_ infinities and can compare the registers and return again.
+      cmn op0, #1 << 23 cmnpl op1, #1 << 23 bmi LOCAL_LABEL(NaN_check_positive)
 
-  // Second-tier return path, now we've ruled out anything difficult.
-  cmp     op0, op1
-  SetReturnRegister
-  bx      lr
+// Second-tier return path, now we've ruled out anything difficult.
+cmp op0,
+    op1 SetReturnRegister bx lr
 
-LOCAL_LABEL(NaN_check_positive):
-  // Third tier for positive numbers. Here we know that at least one of the
-  // inputs has exponent 0xFF. But they might still be infinities rather than
-  // NaNs. So now we must check whether there's an actual NaN, by shifting each
-  // input left to get rid of the sign bit, and seeing if the result is
-  // _greater_ than 0xFF000000 (but not equal).
-  //
-  // We could have skipped the second-tier check and done this more rigorous
-  // test immediately. But that would cost an extra instruction in the case
-  // where there are no infinities or NaNs, and we assume that that is so much
-  // more common that it's worth optimizing for.
-  mov     r12, #0xFF << 24
-  cmp     r12, op0, LSL #1   // if LO, then r12 < (op0 << 1), so op0 is a NaN
-  cmphs   r12, op1, LSL #1   // if not LO, then do the same check for op1
-  blo     LOCAL_LABEL(NaN)           // now, if LO, there's definitely a NaN
+    LOCAL_LABEL(NaN_check_positive)
+    : // Third tier for positive numbers. Here we know that at least one of the
+      // inputs has exponent 0xFF. But they might still be infinities rather
+      // than NaNs. So now we must check whether there's an actual NaN, by
+      // shifting each input left to get rid of the sign bit, and seeing if the
+      // result is _greater_ than 0xFF000000 (but not equal).
+      //
+      // We could have skipped the second-tier check and done this more 
rigorous
+      // test immediately. But that would cost an extra instruction in the case
+      // where there are no infinities or NaNs, and we assume that that is so
+      // much more common that it's worth optimizing for.
+      mov r12, #0xFF << 24 cmp r12, op0,
+      LSL #1 // if LO, then r12 < (op0 << 1), so op0 is a NaN
+      cmphs r12,
+      op1, LSL #1          // if not LO, then do the same check for op1
+      blo LOCAL_LABEL(NaN) // now, if LO, there's definitely a NaN
 
-  // Now we've finally ruled out NaNs! And we still know both inputs are
-  // positive. So the third-tier return path can just compare the numbers
-  // again.
-  cmp     op0, op1
-  SetReturnRegister
-  bx      lr
+// Now we've finally ruled out NaNs! And we still know both inputs are
+// positive. So the third-tier return path can just compare the numbers
+// again.
+cmp op0,
+    op1 SetReturnRegister bx lr
 
-LOCAL_LABEL(negative):
-  // We come here if at least one operand is negative. We haven't checked for
-  // NaNs at all yet (the sign check came first), so repeat the first-tier
-  // check strategy of seeing if all exponent bits are set in r12.
-  //
-  // On this path, the sign bit in r12 is set, so if adding 1 to the low
-  // exponent bit carries all the way through into the sign bit, it will
-  // _clear_ the sign bit rather than setting it. So we expect MI to be the
-  // "definitely no NaNs" result, where it was PL on the positive branch.
-  cmn     r12, #1 << 23
-  bpl     LOCAL_LABEL(NaNInf_check_negative)
+    LOCAL_LABEL(negative)
+    : // We come here if at least one operand is negative. We haven't checked
+      // for NaNs at all yet (the sign check came first), so repeat the
+      // first-tier check strategy of seeing if all exponent bits are set in
+      // r12.
+      //
+      // On this path, the sign bit in r12 is set, so if adding 1 to the low
+      // exponent bit carries all the way through into the sign bit, it will
+      // _clear_ the sign bit rather than setting it. So we expect MI to be the
+      // "definitely no NaNs" result, where it was PL on the positive branch.
+      cmn r12, #1 << 23 bpl LOCAL_LABEL(NaNInf_check_negative)
 
-  // Now we have no NaNs, but at least one negative number. This gives us two
-  // complications:
-  //
-  //  1. Floating-point numbers are sign/magnitude, not two's complement, so we
-  //     have to consider separately the cases of "both negative" and "one of
-  //     each sign".
-  //
-  //  2. -0 and +0 are required to compare equal.
-  //
-  // But problem #1 is not as hard as it sounds! If both operands are negative,
-  // then we can get the result we want by comparing them as unsigned integers
-  // the opposite way round, because the input with the smaller value (as an
-  // integer) is the larger number in an FP ordering sense. And if one operand
-  // is negative and the other is positive, the _same_ reversed comparison
-  // works, because the positive number (with zero sign bit) will always
-  // compare less than the negative one in an unsigned-integers sense.
-  //
-  // So we only have to worry about problem #2, signed zeroes. This only
-  // affects the answer if _both_ operands are zero. And we can check that
-  // easily, because it happens if and only if r12 = 0x80000000. (We know r12
-  // has its sign bit set; if it has no other bits set, that's because both
-  // inputs were either 0x80000000 or 0x00000000.)
-  cmp     r12, #0x80000000        // EQ if both inputs are zero
-  cmpne   op1, op0                // otherwise, compare them backwards
-  SetReturnRegister
-  bx      lr
+// Now we have no NaNs, but at least one negative number. This gives us two
+// complications:
+//
+//  1. Floating-point numbers are sign/magnitude, not two's complement, so we
+//     have to consider separately the cases of "both negative" and "one of
+//     each sign".
+//
+//  2. -0 and +0 are required to compare equal.
+//
+// But problem #1 is not as hard as it sounds! If both operands are negative,
+// then we can get the result we want by comparing them as unsigned integers
+// the opposite way round, because the input with the smaller value (as an
+// integer) is the larger number in an FP ordering sense. And if one operand
+// is negative and the other is positive, the _same_ reversed comparison
+// works, because the positive number (with zero sign bit) will always
+// compare less than the negative one in an unsigned-integers sense.
+//
+// So we only have to worry about problem #2, signed zeroes. This only
+// affects the answer if _both_ operands are zero. And we can check that
+// easily, because it happens if and only if r12 = 0x80000000. (We know r12
+// has its sign bit set; if it has no other bits set, that's because both
+// inputs were either 0x80000000 or 0x00000000.)
+cmp r12,
+    #0x80000000 // EQ if both inputs are zero
+    cmpne op1,
+    op0 // otherwise, compare them backwards
+        SetReturnRegister bx lr
 
-LOCAL_LABEL(NaNInf_check_negative):
-  // Second tier for negative numbers: we know the OR of the exponents is 0xFF,
-  // but again, we might not have either _actual_ exponent 0xFF, and also, an
-  // exponent 0xFF might be an infinity instead of a NaN.
-  //
-  // On this path we've already branched twice (once for negative numbers and
-  // once for the first-tier NaN check), so we'll just go straight to the
-  // precise check for NaNs.
-  mov     r12, #0xFF << 24
-  cmp     r12, op0, LSL #1   // if LO, then r12 < (op0 << 1), so op0 is a NaN
-  cmphs   r12, op1, LSL #1   // if not LO, then do the same check for op1
-  blo     LOCAL_LABEL(NaN)
+        LOCAL_LABEL(NaNInf_check_negative)
+    : // Second tier for negative numbers: we know the OR of the exponents is
+      // 0xFF, but again, we might not have either _actual_ exponent 0xFF, and
+      // also, an exponent 0xFF might be an infinity instead of a NaN.
+      //
+      // On this path we've already branched twice (once for negative numbers
+      // and once for the first-tier NaN check), so we'll just go straight to
+      // the precise check for NaNs.
+      mov r12, #0xFF << 24 cmp r12, op0,
+      LSL #1 // if LO, then r12 < (op0 << 1), so op0 is a NaN
+      cmphs r12,
+      op1, LSL #1 // if not LO, then do the same check for op1
+      blo LOCAL_LABEL(NaN)
 
-  // Now we've ruled out NaNs, so we can just compare the two input registers
-  // and return. On this path we _don't_ need to check for the special case of
-  // comparing two zeroes, because we only came here if the bitwise OR of the
-  // exponent fields was 0xFF, which means the exponents can't both have been
-  // zero! So we can _just_ do the reversed CMP and finish.
-  cmp     op1, op0
-  SetReturnRegister
-  bx      lr
+// Now we've ruled out NaNs, so we can just compare the two input registers
+// and return. On this path we _don't_ need to check for the special case of
+// comparing two zeroes, because we only came here if the bitwise OR of the
+// exponent fields was 0xFF, which means the exponents can't both have been
+// zero! So we can _just_ do the reversed CMP and finish.
+cmp op1, op0 SetReturnRegister bx lr
diff --git a/compiler-rt/lib/builtins/arm/thumb1/fcmp.h 
b/compiler-rt/lib/builtins/arm/thumb1/fcmp.h
index bcfe92840..3b359cac5 100644
--- a/compiler-rt/lib/builtins/arm/thumb1/fcmp.h
+++ b/compiler-rt/lib/builtins/arm/thumb1/fcmp.h
@@ -48,144 +48,133 @@
 //  - if the 8 exponent bits of the output are not all 1, then there are
 //    definitely no NaNs, so a fast path can handle most non-NaN cases.
 
-  // Set up the constant 1 << 23 in a register, which we'll need on all
-  // branches.
-  movs    r3, #1
-  lsls    r3, r3, #23
+// Set up the constant 1 << 23 in a register, which we'll need on all
+// branches.
+movs r3, #1 lsls r3, r3,
+    #23
 
-  // Diverge control for the negative-numbers case.
-  movs    r2, op0
-  orrs    r2, r2, op1
-  bmi     LOCAL_LABEL(negative)         // high bit set => at least one 
negative input
+    // Diverge control for the negative-numbers case.
+    movs r2,
+    op0 orrs r2, r2,
+    op1 bmi LOCAL_LABEL(negative) // high bit set => at least one negative 
input
 
-  // Here, both inputs are positive. Try adding 1<<23 to their bitwise OR in
-  // r2. This will carry all the way into the top bit, setting the N flag, if
-  // all 8 exponent bits were set.
-  cmn     r2, r3
-  bmi     LOCAL_LABEL(NaNInf_check_positive) // need to look harder for NaNs
+// Here, both inputs are positive. Try adding 1<<23 to their bitwise OR in
+// r2. This will carry all the way into the top bit, setting the N flag, if
+// all 8 exponent bits were set.
+cmn r2,
+    r3 bmi LOCAL_LABEL(NaNInf_check_positive) // need to look harder for NaNs
 
-  // The fastest fast path: both inputs positive and we could easily tell there
-  // were no NaNs. So we just compare op0 and op1 as unsigned integers.
-  cmp     op0, op1
-  SetReturnRegister
-  bx      lr
+// The fastest fast path: both inputs positive and we could easily tell there
+// were no NaNs. So we just compare op0 and op1 as unsigned integers.
+cmp op0,
+    op1 SetReturnRegister bx lr
 
-LOCAL_LABEL(NaNInf_check_positive):
-  // Second tier for positive numbers. We come here if both inputs are
-  // positive, but our fast initial check didn't manage to rule out a NaN. But
-  // it's not guaranteed that there _is_ a NaN, for two reasons:
-  //
-  //  1. An input with exponent 0xFF might be an infinity instead. Those behave
-  //    normally under comparison.
-  //
-  //  2. There might not even _be_ an input with exponent 0xFF. All we know so
-  //     far is that the two inputs ORed together had all the exponent bits
-  //     set. So each of those bits is set in _at least one_ of the inputs, but
-  //     not necessarily all in the _same_ input.
-  //
-  // Test each exponent individually for 0xFF, using the same CMN idiom as
-  // above. If neither one carries into the sign bit then we have no NaNs _or_
-  // infinities and can compare the registers and return again.
-  cmn     op0, r3
-  bmi     LOCAL_LABEL(NaN_check_positive)
-  cmn     op1, r3
-  bmi     LOCAL_LABEL(NaN_check_positive)
+    LOCAL_LABEL(NaNInf_check_positive)
+    : // Second tier for positive numbers. We come here if both inputs are
+      // positive, but our fast initial check didn't manage to rule out a NaN.
+      // But it's not guaranteed that there _is_ a NaN, for two reasons:
+      //
+      //  1. An input with exponent 0xFF might be an infinity instead. Those
+      //  behave
+      //    normally under comparison.
+      //
+      //  2. There might not even _be_ an input with exponent 0xFF. All we know
+      //  so
+      //     far is that the two inputs ORed together had all the exponent bits
+      //     set. So each of those bits is set in _at least one_ of the inputs,
+      //     but not necessarily all in the _same_ input.
+      //
+      // Test each exponent individually for 0xFF, using the same CMN idiom as
+      // above. If neither one carries into the sign bit then we have no NaNs
+      // _or_ infinities and can compare the registers and return again.
+      cmn op0, r3 bmi LOCAL_LABEL(NaN_check_positive)
+cmn op1, r3 bmi LOCAL_LABEL(NaN_check_positive)
 
-  // Second-tier return path, now we've ruled out anything difficult.
-  cmp     op0, op1
-  SetReturnRegister
-  bx      lr
+// Second-tier return path, now we've ruled out anything difficult.
+cmp op0,
+    op1 SetReturnRegister bx lr
 
-LOCAL_LABEL(NaN_check_positive):
-  // Third tier for positive numbers. Here we know that at least one of the
-  // inputs has exponent 0xFF. But they might still be infinities rather than
-  // NaNs. So now we must check whether there's an actual NaN, by shifting each
-  // input left to get rid of the sign bit, and seeing if the result is
-  // _greater_ than 0xFF000000 (but not equal).
-  //
-  // We could have skipped the second-tier check and done this more rigorous
-  // test immediately. But that would cost an extra instruction in the case
-  // where there are no infinities or NaNs, and we assume that that is so much
-  // more common that it's worth optimizing for.
-  movs    r2, #0xFF
-  lsls    r2, r2, #24
-  lsls    r3, op0, #1
-  cmp     r3, r2
-  bhi     LOCAL_LABEL(NaN)
-  lsls    r3, op1, #1
-  cmp     r3, r2
-  bhi     LOCAL_LABEL(NaN)
+    LOCAL_LABEL(NaN_check_positive)
+    : // Third tier for positive numbers. Here we know that at least one of the
+      // inputs has exponent 0xFF. But they might still be infinities rather
+      // than NaNs. So now we must check whether there's an actual NaN, by
+      // shifting each input left to get rid of the sign bit, and seeing if the
+      // result is _greater_ than 0xFF000000 (but not equal).
+      //
+      // We could have skipped the second-tier check and done this more 
rigorous
+      // test immediately. But that would cost an extra instruction in the case
+      // where there are no infinities or NaNs, and we assume that that is so
+      // much more common that it's worth optimizing for.
+      movs r2, #0xFF lsls r2, r2, #24 lsls r3, op0, #1 cmp r3,
+      r2 bhi LOCAL_LABEL(NaN)
+lsls r3, op1, #1 cmp r3, r2 bhi LOCAL_LABEL(NaN)
 
-  // Now we've finally ruled out NaNs! And we still know both inputs are
-  // positive. So the third-tier return path can just compare the numbers
-  // again.
-  cmp     op0, op1
-  SetReturnRegister
-  bx      lr
+// Now we've finally ruled out NaNs! And we still know both inputs are
+// positive. So the third-tier return path can just compare the numbers
+// again.
+cmp op0,
+    op1 SetReturnRegister bx lr
 
-LOCAL_LABEL(negative):
-  // We come here if at least one operand is negative. We haven't checked for
-  // NaNs at all yet (the sign check came first), so repeat the first-tier
-  // check strategy of seeing if all exponent bits are set in r12.
-  //
-  // On this path, the sign bit in r12 is set, so if adding 1 to the low
-  // exponent bit carries all the way through into the sign bit, it will
-  // _clear_ the sign bit rather than setting it. So we expect MI to be the
-  // "definitely no NaNs" result, where it was PL on the positive branch.
-  cmn     r2, r3
-  bpl     LOCAL_LABEL(NaNInf_check_negative)
+    LOCAL_LABEL(negative)
+    : // We come here if at least one operand is negative. We haven't checked
+      // for NaNs at all yet (the sign check came first), so repeat the
+      // first-tier check strategy of seeing if all exponent bits are set in
+      // r12.
+      //
+      // On this path, the sign bit in r12 is set, so if adding 1 to the low
+      // exponent bit carries all the way through into the sign bit, it will
+      // _clear_ the sign bit rather than setting it. So we expect MI to be the
+      // "definitely no NaNs" result, where it was PL on the positive branch.
+      cmn r2, r3 bpl LOCAL_LABEL(NaNInf_check_negative)
 
-  // Now we have no NaNs, but at least one negative number. This gives us two
-  // complications:
-  //
-  //  1. Floating-point numbers are sign/magnitude, not two's complement, so we
-  //     have to consider separately the cases of "both negative" and "one of
-  //     each sign".
-  //
-  //  2. -0 and +0 are required to compare equal.
-  //
-  // But problem #1 is not as hard as it sounds! If both operands are negative,
-  // then we can get the result we want by comparing them as unsigned integers
-  // the opposite way round, because the input with the smaller value (as an
-  // integer) is the larger number in an FP ordering sense. And if one operand
-  // is negative and the other is positive, the _same_ reversed comparison
-  // works, because the positive number (with zero sign bit) will always
-  // compare less than the negative one in an unsigned-integers sense.
-  //
-  // So we only have to worry about problem #2, signed zeroes. This only
-  // affects the answer if _both_ operands are zero. And we can check that
-  // easily, because it happens if and only if r12 = 0x80000000. (We know r12
-  // has its sign bit set; if it has no other bits set, that's because both
-  // inputs were either 0x80000000 or 0x00000000.)
-  lsls    r2, r2, #1              // EQ if both inputs are zero (also sets C)
-  beq     1f
-  cmp     op1, op0                // otherwise, compare them backwards
-1:
-  SetReturnRegister
-  bx      lr
+// Now we have no NaNs, but at least one negative number. This gives us two
+// complications:
+//
+//  1. Floating-point numbers are sign/magnitude, not two's complement, so we
+//     have to consider separately the cases of "both negative" and "one of
+//     each sign".
+//
+//  2. -0 and +0 are required to compare equal.
+//
+// But problem #1 is not as hard as it sounds! If both operands are negative,
+// then we can get the result we want by comparing them as unsigned integers
+// the opposite way round, because the input with the smaller value (as an
+// integer) is the larger number in an FP ordering sense. And if one operand
+// is negative and the other is positive, the _same_ reversed comparison
+// works, because the positive number (with zero sign bit) will always
+// compare less than the negative one in an unsigned-integers sense.
+//
+// So we only have to worry about problem #2, signed zeroes. This only
+// affects the answer if _both_ operands are zero. And we can check that
+// easily, because it happens if and only if r12 = 0x80000000. (We know r12
+// has its sign bit set; if it has no other bits set, that's because both
+// inputs were either 0x80000000 or 0x00000000.)
+lsls r2, r2,
+    #1 // EQ if both inputs are zero (also sets C)
+    beq 1f cmp op1,
+    op0 // otherwise, compare them backwards
+    1 : SetReturnRegister bx lr
 
-LOCAL_LABEL(NaNInf_check_negative):
-  // Second tier for negative numbers: we know the OR of the exponents is 0xFF,
-  // but again, we might not have either _actual_ exponent 0xFF, and also, an
-  // exponent 0xFF might be an infinity instead of a NaN.
-  //
-  // On this path we've already branched twice (once for negative numbers and
-  // once for the first-tier NaN check), so we'll just go straight to the
-  // precise check for NaNs.
-  movs    r2, #0xFF
-  lsls    r2, r2, #24
-  lsls    r3, op0, #1
-  cmp     r3, r2
-  bhi     LOCAL_LABEL(NaN)
-  lsls    r3, op1, #1
-  cmp     r3, r2
-  bhi     LOCAL_LABEL(NaN)
+        LOCAL_LABEL(NaNInf_check_negative)
+    : // Second tier for negative numbers: we know the OR of the exponents is
+      // 0xFF, but again, we might not have either _actual_ exponent 0xFF, and
+      // also, an exponent 0xFF might be an infinity instead of a NaN.
+      //
+      // On this path we've already branched twice (once for negative numbers
+      // and once for the first-tier NaN check), so we'll just go straight to
+      // the precise check for NaNs.
+      movs r2,
+      #0xFF lsls r2,
+      r2,
+      #24 lsls r3,
+      op0,
+      #1 cmp r3,
+      r2 bhi LOCAL_LABEL(NaN)
+lsls r3, op1, #1 cmp r3, r2 bhi LOCAL_LABEL(NaN)
 
-  // Now we've ruled out NaNs, so we can just compare the two input registers
-  // and return. On this path we _don't_ need to check for the special case of
-  // comparing two zeroes, because we only came here if the bitwise OR of the
-  // exponent fields was 0xFF, which means the exponents can't both have been
-  // zero! So we can _just_ do the reversed CMP and finish.
-  cmp     op1, op0
-  SetReturnRegister
-  bx      lr
+// Now we've ruled out NaNs, so we can just compare the two input registers
+// and return. On this path we _don't_ need to check for the special case of
+// comparing two zeroes, because we only came here if the bitwise OR of the
+// exponent fields was 0xFF, which means the exponents can't both have been
+// zero! So we can _just_ do the reversed CMP and finish.
+cmp op1, op0 SetReturnRegister bx lr
diff --git a/compiler-rt/test/builtins/Unit/comparesf2new_test.c 
b/compiler-rt/test/builtins/Unit/comparesf2new_test.c
index 5c8be8835..02fac8ba2 100644
--- a/compiler-rt/test/builtins/Unit/comparesf2new_test.c
+++ b/compiler-rt/test/builtins/Unit/comparesf2new_test.c
@@ -20,21 +20,19 @@ COMPILER_RT_ABI int __ltsf2(float, float);
 COMPILER_RT_ABI int __cmpsf2(float, float);
 COMPILER_RT_ABI int __unordsf2(float, float);
 
-enum Result {
-  RESULT_LT,
-  RESULT_GT,
-  RESULT_EQ,
-  RESULT_UN
-};
+enum Result { RESULT_LT, RESULT_GT, RESULT_EQ, RESULT_UN };
 
-int expect(int line, uint32_t a_rep, uint32_t b_rep, const char *name, int 
result, int ok, const char *expected) {
+int expect(int line, uint32_t a_rep, uint32_t b_rep, const char *name,
+           int result, int ok, const char *expected) {
   if (!ok)
-    printf("error at line %d: %s(%08" PRIx32 ", %08" PRIx32 ") = %d, expected 
%s\n",
+    printf("error at line %d: %s(%08" PRIx32 ", %08" PRIx32
+           ") = %d, expected %s\n",
            line, name, a_rep, b_rep, result, expected);
   return !ok;
 }
 
-int test__comparesf2(int line, uint32_t a_rep, uint32_t b_rep, enum Result 
result) {
+int test__comparesf2(int line, uint32_t a_rep, uint32_t b_rep,
+                     enum Result result) {
   float a = fromRep32(a_rep), b = fromRep32(b_rep);
 
   int eq = __eqsf2(a, b);
@@ -94,7 +92,7 @@ int test__comparesf2(int line, uint32_t a_rep, uint32_t 
b_rep, enum Result resul
   return ret;
 }
 
-#define test__comparesf2(a,b,x) test__comparesf2(__LINE__,a,b,x)
+#define test__comparesf2(a, b, x) test__comparesf2(__LINE__, a, b, x)
 
 int main(void) {
   int status = 0;

``````````

</details>


https://github.com/llvm/llvm-project/pull/179925
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to