UnstableChanges

Summary

  1. [LLD] [COFF] Fix use of uninitialized memory since SVN r375390 (details)
  2. [ARM] Add and adjust saturation tests for upcoming qadd changes. NFC (details)
  3. [ARM] Lower sadd_sat to qadd8 and qadd16 (details)
  4. [MemCpyOpt] Fixing Incorrect Code Motion while Handling Aggregate Type (details)
  5. [obj2yaml] - Stop triggering UB when dumping corrupted strings. (details)
  6. [obj2yaml] - Fix a comment. NFC. (details)
  7. Fix llvm signal tests build. (details)
Commit 150a9ad3ffcc142cfcc933379063bec6cfca0783 by martin
[LLD] [COFF] Fix use of uninitialized memory since SVN r375390
llvm-svn: 375400
The file was modifiedlld/COFF/InputFiles.h
Commit 5ba66fa53ba7f5c2c3e384c48a18fa7601dddd45 by david.green
[ARM] Add and adjust saturation tests for upcoming qadd changes. NFC
llvm-svn: 375401
The file was modifiedllvm/test/CodeGen/ARM/sadd_sat.ll
The file was addedllvm/test/CodeGen/ARM/qdadd.ll
The file was modifiedllvm/test/CodeGen/ARM/ssub_sat.ll
Commit fba831e791ba8978f21d2328499c8d3063401de3 by david.green
[ARM] Lower sadd_sat to qadd8 and qadd16
Lower the target independent signed saturating intrinsics to qadd8 and
qadd16. This custom lowers them from a sadd_sat, catching the node early
before it is promoted. It also adds a QADD8b and QADD16b node to mean
the bottom "lane" of a qadd8/qadd16, so that we can call demand bits on
it to show that it does not use the upper bits.
Also handles QSUB8 and QSUB16.
Differential Revision: https://reviews.llvm.org/D68974
llvm-svn: 375402
The file was modifiedllvm/test/CodeGen/ARM/sadd_sat_plus.ll
The file was modifiedllvm/test/CodeGen/ARM/sadd_sat.ll
The file was modifiedllvm/lib/Target/ARM/ARMInstrInfo.td
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.h
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/ARM/ssub_sat.ll
The file was modifiedllvm/test/CodeGen/ARM/ssub_sat_plus.ll
Commit d6e6aa8a42a96c09a78f0e02ecf50f12deda8024 by selliott
[MemCpyOpt] Fixing Incorrect Code Motion while Handling Aggregate Type
Values
Summary: When MemCpyOpt is handling aggregate type values, if an
instruction (let's call it P) between the targeting load (L) and store
(S) clobbers the source pointer of L, it will try to hoist S before P.
This process will also hoist S's data dependency instructions.
However, the current implementation has a bug that if one of S's
dependency instructions is //also// a user of P, MemCpyOpt will not
prevent it from being hoisted above P and cause a use-before-define
error. For example, in the newly added test file (i.e.
`aggregate-type-crash.ll`), it will try to hoist both `store %my_struct
%1, %my_struct* %3` and its dependent, `%3 = bitcast i8* %2 to
%my_struct*`, above `%2 = call i8* @my_malloc(%my_struct* %0)`. Creating
the following BB:
``` entry:
%1 = bitcast i8* %4 to %my_struct*
%2 = bitcast %my_struct* %1 to i8*
%3 = bitcast %my_struct* %0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %2, i8* align 4 %3,
i64 8, i1 false)
%4 = call i8* @my_malloc(%my_struct* %0)
ret void
``` Where there is a use-before-define error between `%1` and `%4`.
Update: The compiler for the Pony Programming Language [also encounter
the same bug](https://github.com/ponylang/ponyc/issues/3140)
Patch by Min-Yih Hsu (myhsu)
Reviewers: eugenis, pcc, dblaikie, dneilson, t.p.northover, lattner
Reviewed By: eugenis
Subscribers: lenary, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66060
llvm-svn: 375403
The file was modifiedllvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
The file was addedllvm/test/Transforms/MemCpyOpt/aggregate-type-crash.ll
Commit 4ec0b084389619442638d7d3563793f21d787501 by grimar
[obj2yaml] - Stop triggering UB when dumping corrupted strings.
We have a following code to find quote type:
if (isspace(S.front()) || isspace(S.back()))
...
Problem is that:
"int isspace( int ch ): The behavior is undefined if the value of ch is
not representable as unsigned char and is not equal to EOF."
(https://en.cppreference.com/w/cpp/string/byte/isspace)
This patch shows how this UB can be triggered and fixes an issue.
Differential revision: https://reviews.llvm.org/D69160
llvm-svn: 375404
The file was addedllvm/test/tools/obj2yaml/invalid-section-name.yaml
The file was modifiedllvm/include/llvm/Support/YAMLTraits.h
Commit 6fc289191600cfb76a3d3b469c592caee19fca4f by grimar
[obj2yaml] - Fix a comment. NFC.
I forgot to address this nit before committing..
llvm-svn: 375405
The file was modifiedllvm/test/tools/obj2yaml/invalid-section-name.yaml
Commit a48633b5bbbbe9e20a7199eaed651ff6024d7967 by David CARLIER
Fix llvm signal tests build.
llvm-svn: 375406
The file was modifiedllvm/unittests/Support/SignalsTest.cpp