aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorKai Nacke <kai.nacke@de.ibm.com>2022-06-02 13:42:49 -0400
committerKai Nacke <kai.nacke@de.ibm.com>2022-06-08 14:52:13 -0400
commitd897a14c2ef756d99344f4fae8864108e0131007 (patch)
tree4b20c339a194478df599bd7e7b234f99db952884 /llvm/lib/Support/APFloat.cpp
parent4636b93044faf1fbf54139e872af4856adafe435 (diff)
downloadllvm-d897a14c2ef756d99344f4fae8864108e0131007.zip
llvm-d897a14c2ef756d99344f4fae8864108e0131007.tar.gz
llvm-d897a14c2ef756d99344f4fae8864108e0131007.tar.bz2
[SystemZ] Fix check for zero size when lowering memcmp.
During lowering of memcmp/bcmp, the check for a size of 0 is done in 2 different ways. In rare cases this can lead to a crash in SystemZSelectionDAGInfo::EmitTargetCodeForMemcmp(). The root cause is that SelectionDAGBuilder::visitMemCmpBCmpCall() checks for a constant int value which is not yet evaluated. When the value is turned into a SDValue, then the evaluation is done and results in a ConstantSDNode. But EmitTargetCodeForMemcmp() expects the special case of 0 length to be handled, which results in an assertion. The fix is to turn the value into a SDValue, so that both functions use the same check. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D126900
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
0 files changed, 0 insertions, 0 deletions