================
@@ -268,6 +268,12 @@ static Type *convertToIRType(FuncArgTypeID ID, LLVMContext 
&Ctx,
   case SizeT:
   case SSizeT:
     return getSizeTType(Ctx, DL);
+  case CmpResult:
+    if (TT.isAArch64() || TT.isAMDGPU() || TT.isWasm())
----------------
arichardson wrote:

It looks like this mostly matches the ifdef chain I added to 
compiler-rt/lib/builtins/fp_compare_impl.inc in 
777ca513c864fa02292ac255185ea1b0589fc288 (which should now hopefully faithfully 
match GCC). I do notice that the amdgpu if() here is not included there, should 
we add that to the `#if defined(__aarch64__)`?  

The other difference is that we aren't handling the LLP64 ABIs (which I think 
it just windows?).

```
#if defined(__aarch64__) || defined(__arm64ec__)
// AArch64 GCC overrides libgcc_cmp_return to use int instead of long.
typedef int CMP_RESULT;
#elif defined(__wasm__)
// Both wasm32 and wasm64 use i32
typedef int CMP_RESULT;
#elif __SIZEOF_POINTER__ == 8 && __SIZEOF_LONG__ == 4
// LLP64 ABIs use long long instead of long.
typedef long long CMP_RESULT;
#elif __AVR__
// AVR uses a single byte for the return value.
typedef char CMP_RESULT;
#else
// Otherwise the comparison functions return long.
typedef long CMP_RESULT;
#endif
```

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

Reply via email to