[compiler-rt] [llvm] [WebAssembly] Explicitly set `getCmpLibcallReturnType` to i32 (PR #192425)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 09:16:51 PDT 2026


================
@@ -29,6 +29,11 @@ class WebAssemblyTargetLowering final : public TargetLowering {
   MVT getPointerTy(const DataLayout &DL, uint32_t AS = 0) const override;
   MVT getPointerMemTy(const DataLayout &DL, uint32_t AS = 0) const override;
 
+  MVT::SimpleValueType getCmpLibcallReturnType() const override {
+    // i32 may be more efficient than the default word size for wasm64 targets
+    return MVT::i32;
----------------
sbc100 wrote:

Also, I'm not actually sure its worth diverging here for wasm64.   We might just want to go with wordsize too for consistency.   

https://github.com/llvm/llvm-project/pull/192425


More information about the llvm-commits mailing list