SuccessChanges

Summary

  1. [SimplifyCFG] avoid illegal phi with both poison and undef (details)
  2. [clang][Lifetimes] Fix false positive warning from BUG 49342 (details)
Commit 356cdabd3a9e0ff919ea2c1a35c8706ecb915297 by spatel
[SimplifyCFG] avoid illegal phi with both poison and undef

In the example based on:
https://llvm.org/PR49218
...we are crashing because poison is a subclass of undef, so we merge blocks and create:

PHI node has multiple entries for the same basic block with different incoming values!
  %k3 = phi i64 [ poison, %entry ], [ %k3, %g ], [ undef, %entry ]

If both poison and undef values are incoming, we soften the poison values to undef.

Differential Revision: https://reviews.llvm.org/D97495
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was addedllvm/test/Transforms/SimplifyCFG/poison-merge.ll
Commit dd6738d93de148f2239ef5be82a61cf8f5f71124 by xazax.hun
[clang][Lifetimes] Fix false positive warning from BUG 49342

Differential Revision: https://reviews.llvm.org/D97605
The file was modifiedclang/test/Sema/warn-lifetime-analysis-nocfg.cpp
The file was modifiedclang/lib/Sema/SemaInit.cpp