[all-commits] [llvm/llvm-project] c8c176: [MipsISelLowering] avoid emitting libcalls to __mu...
Nick Desaulniers via All-commits
all-commits at lists.llvm.org
Fri Aug 27 15:25:14 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8c176d999d2c2166dee8d67c32b4f8f42b4f1bd
https://github.com/llvm/llvm-project/commit/c8c176d999d2c2166dee8d67c32b4f8f42b4f1bd
Author: Nick Desaulniers <ndesaulniers at google.com>
Date: 2021-08-27 (Fri, 27 Aug 2021)
Changed paths:
M llvm/lib/Target/Mips/MipsISelLowering.cpp
A llvm/test/CodeGen/Mips/overflow-intrinsic-optimizations.ll
Log Message:
-----------
[MipsISelLowering] avoid emitting libcalls to __mulodi4()
__has_builtin(__builtin_mul_overflow) returns true for 32b MIPS targets,
but Clang is deferring to compiler RT when encountering `long long`
types. This breaks sanitizer builds of the Linux kernel that are using
__builtin_mul_overflow with these types for these targets.
If the semantics of __has_builtin mean "the compiler resolves these,
always" then we shouldn't conditionally emit a libcall.
This will still need to be worked around in the Linux kernel in order to
continue to support malta_defconfig builds of the Linux kernel for this
target with older releases of clang.
Link: https://bugs.llvm.org/show_bug.cgi?id=28629
Link: https://github.com/ClangBuiltLinux/linux/issues/1438
Reviewed By: rengolin
Differential Revision: https://reviews.llvm.org/D108844
More information about the All-commits
mailing list