In progressChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)


  1. [DivRemPairs] make sure we have a valid CFG for hoisting division (details)
  2. [AArch64][x86] add tests for add-with-overflow folds; NFC (details)
  3. [DAGCombiner] don't try to partially reduce add-with-overflow ops (details)
  4. Revert "[Preprocessor] Implement -fminimize-whitespace." (details)
Commit 2f43c816f18a4e953e07b9d2be663b9509b7a342 by tstellar
[DivRemPairs] make sure we have a valid CFG for hoisting division

This transform was added with e38b7e894808ec2
and as shown in: could crash without an extra check of the blocks.

There might be a more compact way to write this constraint,
but we can't just count the successors/predecessors without
affecting a test that includes a switch instruction.

(cherry picked from commit 5b83261c1518a39636abe094123f1704bbfd972f)
The file was modifiedllvm/lib/Transforms/Scalar/DivRemPairs.cpp
The file was modifiedllvm/test/Transforms/DivRemPairs/X86/div-expanded-rem-pair.ll
Commit e6ca0238335b5b4b52a8e5af8233bfe6d6aa7bb1 by tstellar
[AArch64][x86] add tests for add-with-overflow folds; NFC

There's a generic combine for these, but no test coverage.
It's not clear if this is actually a good fold.
The combine was added with D58874, but it has a bug that
can cause crashing ( ).

(cherry picked from commit e427077ec10ea18ac21f5065342183481d87783a)
The file was modifiedllvm/test/CodeGen/AArch64/addsub.ll
The file was modifiedllvm/test/CodeGen/X86/combine-add.ll
Commit 3bce61312d4636ef6fd9e46c8d84e3fefba0569a by tstellar
[DAGCombiner] don't try to partially reduce add-with-overflow ops

This transform was added with D58874, but there were no tests for overflow ops.
We need to change this one way or another because it can crash as shown in:

Note that if there are no uses of an overflow op's bool overflow result, we
reduce it to a regular math op, so we continue to fold that case either way.
If we have uses of both the math and the overflow bool, then we are likely
not saving anything by creating an independent sub instruction as seen in
the test diffs here.

This patch makes the behavior in SDAG consistent with what we do in
instcombine AFAICT.

Differential Revision:

(cherry picked from commit fa6b2c9915ba27e1e97f8901ea4aa877f331fb9f)
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/combine-add.ll
The file was modifiedllvm/test/CodeGen/AArch64/addsub.ll
Commit 4a450da71b3fbef613376cd7c8066942785af937 by tstellar
Revert "[Preprocessor] Implement -fminimize-whitespace."

This reverts commit ae6b40000238e5faaaa319ffcfc713a15e459be8.
The file was modifiedclang/lib/Driver/Types.cpp
The file was modifiedclang/test/Preprocessor/hash_line.c
The file was removedclang/test/Preprocessor/minimize-whitespace.c
The file was modifiedclang/test/Preprocessor/stringize_space.c
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Preprocessor/first-line-indent.c
The file was modifiedclang/include/clang/Basic/
The file was modifiedclang/test/Preprocessor/macro_space.c
The file was modifiedclang/test/Preprocessor/comment_save.c
The file was modifiedclang/docs/ClangCommandLineReference.rst
The file was modifiedclang/lib/Frontend/PrintPreprocessedOutput.cpp
The file was removedclang/test/Preprocessor/minimize-whitespace-messages.c
The file was removedclang/test/Preprocessor/line-directive-output-mincol.c
The file was modifiedclang/test/Preprocessor/print_line_include.c
The file was modifiedclang/include/clang/Driver/Types.h
The file was modifiedclang/include/clang/Frontend/PreprocessorOutputOptions.h
The file was modifiedclang/test/Preprocessor/line-directive-output.c
The file was modifiedclang/lib/Lex/Preprocessor.cpp
The file was modifiedclang/include/clang/Driver/