1. [InstSimplify/NewGVN] Add option to control the use of undef. (details)
  2. [InstSimplify] Make sure CanUseUndef is initialized in all cases. (details)
  3. Fix 64-bit copy to SCC (details)
  4. [X86][GlobalISel] Enable a test case for sext i32->i64 that was commented out. (details)
  5. [clang] Fix typo in comment (details)
  6. [NFC][StackSafety] Avoid some duplications in tests (details)
Commit d236e1c7b606c461b5cb8a8a87d50ead5d1bcbb9 by flo
[InstSimplify/NewGVN] Add option to control the use of undef.

Making use of undef is not safe if the simplification result is not used
to replace all uses of the result. This leads to problems in NewGVN,
which does not replace all uses in the IR directly. See PR33165 for more

This patch adds an option to SimplifyQuery to disable the use of undef.

Note that I've only guarded uses if isa<UndefValue>/m_Undef where
SimplifyQuery is currently available. If we agree on the general
direction, I'll update the remaining uses.

Reviewed By: nikic

Differential Revision:
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was removedllvm/test/Transforms/NewGVN/todo-pr33165-distribute-undef.ll
The file was modifiedllvm/include/llvm/Analysis/InstructionSimplify.h
The file was addedllvm/test/Transforms/NewGVN/pr33165-distribute-undef.ll
Commit 5a0d6cdbd16c80d39e3a237582f6bb47aadacb67 by flo
[InstSimplify] Make sure CanUseUndef is initialized in all cases.

This should fix a bunch of buildbot failures.
The file was modifiedllvm/include/llvm/Analysis/InstructionSimplify.h
Commit 62d8b8a2253c4615723e4fdd92505f25d78c75ee by Piotr Sobczak
Fix 64-bit copy to SCC

Fix 64-bit copy to SCC by restricting the pattern resulting
in such a copy to subtargets supporting 64-bit scalar compare,
and mapping the copy to S_CMP_LG_U64.

Before introducing the S_CSELECT pattern with explicit SCC
(0045786f146e78afee49eee053dc29ebc842fee1), there was no need
for handling 64-bit copy to SCC ($scc = COPY sreg_64).

The proposed handling to read only the low bits was however
based on a false premise that it is only one bit that matters,
while in fact the copy source might be a vector of booleans and
all bits need to be considered.

The practical problem of mapping the 64-bit copy to SCC is that
the natural instruction to use (S_CMP_LG_U64) is not available
on old hardware. Fix it by restricting the problematic pattern
to subtargets supporting the instruction (hasScalarCompareEq64).

Differential Revision:
The file was modifiedllvm/test/CodeGen/AMDGPU/select-vectors.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fshl.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/addrspacecast.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/extractelt-to-trunc.ll
The file was modifiedllvm/lib/Target/AMDGPU/
The file was modifiedllvm/test/CodeGen/AMDGPU/udiv64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/select-opt.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/vselect.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz_zero_undef.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sdiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/mad_uint24.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/trunc.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fceil64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/udivrem.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fshr.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sdiv64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sint_to_fp.f64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/32-bit-local-address-space.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sad.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/uint_to_fp.f64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/select64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/srem64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/urem64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
Commit 4e681fad46868c1c68a5ff9193447eb245824ca1 by craig.topper
[X86][GlobalISel] Enable a test case for sext i32->i64 that was commented out.

Test case seems to work so I guess whatever lead to it being
commented out with a FIXME has been fixed.
The file was modifiedllvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll
Commit 898880fe4e329ce7fc6bbe30f309ef3b91535c21 by Dávid Bolvanský
[clang] Fix typo in comment

In the handleIntToFloatConversion() function, 6th parameter is ConvertFloat, 7th parameter is ConvertInt.

Reviewed By: njames93, xbolva00

Differential Revision:
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit 2a11d5dcc97a454bfd6db0771709cd554a5ccfac by Vitaly Buka
[NFC][StackSafety] Avoid some duplications in tests
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa.ll
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll