[all-commits] [llvm/llvm-project] 3e7ee5: [InferAttrs] Do not mark first argument of str(n)c...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Thu Apr 15 15:00:55 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3e7ee5428d3442564b9581adc2fb14f4e0a54bcd
https://github.com/llvm/llvm-project/commit/3e7ee5428d3442564b9581adc2fb14f4e0a54bcd
Author: Florian Hahn <flo at fhahn.com>
Date: 2021-04-15 (Thu, 15 Apr 2021)
Changed paths:
M llvm/lib/Transforms/Utils/BuildLibCalls.cpp
M llvm/test/Transforms/InferFunctionAttrs/annotate.ll
Log Message:
-----------
[InferAttrs] Do not mark first argument of str(n)cat as writeonly.
str(n)cat appends a copy of the second argument to the end of the first
argument. To find the end of the first argument, str(n)cat has to read
from it until it finds the terminating 0. So it should not be marked as
writeonly. I think this means the argument should not be marked as
writeonly.
(This is causing a mis-compile with legacy DSE, before it got removed)
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D100601
More information about the All-commits
mailing list