OSDN Git Service

CodeGen: check return types match when emitting tail call to builtin.
authorTim Northover <tnorthover@apple.com>
Tue, 22 Mar 2016 19:14:38 +0000 (19:14 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 22 Mar 2016 19:14:38 +0000 (19:14 +0000)
commit7561ec8b4bfcc8fab5770582bda7da7c945904e4
tree807c471eb93249bab82221aee9ff3b4367328c54
parente6f4276ebbb99169143ceedb4d625c64496f79c2
CodeGen: check return types match when emitting tail call to builtin.

We were just completely ignoring the types when determining whether we could
safely emit a libcall as a tail call. This is clearly wrong.

Theoretically, we could dig deeper looking for incidental matches (much like
the generic code in Analysis.cpp does), but it's probably not worth it for the
few libcalls that exist.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264084 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
test/CodeGen/ARM/tail-call-builtin.ll [new file with mode: 0644]
test/CodeGen/X86/atomic-non-integer.ll