FailedChanges

Summary

  1. Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" (details)
  2. Revert "[MLIR] Parallelize affine.for op to 1-D affine.parallel op" (details)
  3. [OpenMPOpt] ICV Tracking (details)
  4. [DAGCombiner] visitSIGN_EXTEND_INREG should fold sext_vector_inreg(undef) to 0 not undef. (details)
  5. [llvm-reduce] extractArgumentsFromModule(): don't crash when deleting instr twice (details)
  6. [llvm-reduce] extractGVsFromModule(): don't crash when deleting instr twice (details)
Commit 7ea46aee3670981827c04df89b2c3a1cbdc7561b by lebedev.ri
Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions"

Assume bundle can have more than one entry with the same name,
but at least AlignmentFromAssumptionsPass::extractAlignmentInfo() uses
getOperandBundle("align"), which internally assumes that it isn't the
case, and happily crashes otherwise.

Minimal reduced reproducer: run `opt -alignment-from-assumptions` on

target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%0 = type { i64, %1*, i8*, i64, %2, i32, %3*, i8* }
%1 = type opaque
%2 = type { i8, i8, i16 }
%3 = type { i32, i32, i32, i32 }

; Function Attrs: nounwind
define i32 @f(%0* noalias nocapture readonly %arg, %0* noalias %arg1) local_unnamed_addr #0 {
bb:
  call void @llvm.assume(i1 true) [ "align"(%0* %arg, i64 8), "align"(%0* %arg1, i64 8) ]
  ret i32 0
}

; Function Attrs: nounwind willreturn
declare void @llvm.assume(i1) #1

attributes #0 = { nounwind "reciprocal-estimates"="none" }
attributes #1 = { nounwind willreturn }


This is what we'd have with -mllvm -enable-knowledge-retention

This reverts commit c95ffadb2474a4d8c4f598d94d35a9f31d9606cb.
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedclang/test/CodeGen/builtin-align.c
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function.cpp
The file was modifiedclang/test/CodeGen/builtin-align-array.c
The file was modifiedclang/test/CodeGen/alloc-align-attr.c
The file was modifiedllvm/unittests/Analysis/AssumeBundleQueriesTest.cpp
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params-variable.cpp
The file was modifiedclang/test/CodeGen/builtin-assume-aligned.c
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-two-params.cpp
The file was modifiedllvm/test/Transforms/AlignmentFromAssumptions/simple.ll
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-openmp.cpp
The file was modifiedllvm/test/Transforms/AlignmentFromAssumptions/simple32.ll
The file was modifiedllvm/test/Verifier/assume-bundles.ll
The file was modifiedclang/test/CodeGen/align_value.cpp
The file was modifiedllvm/test/Transforms/InstCombine/assume.ll
The file was modifiedllvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
The file was modifiedclang/test/OpenMP/simd_codegen.cpp
The file was modifiedclang/test/CodeGen/non-power-of-2-alignment-assumptions.c
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-paramvar.cpp
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp
The file was modifiedllvm/lib/IR/IRBuilder.cpp
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-lvalue.cpp
The file was modifiedllvm/test/Transforms/PhaseOrdering/inlining-alignment-assumptions.ll
The file was modifiedclang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params.cpp
The file was modifiedllvm/test/Transforms/Inline/align.ll
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp
The file was modifiedllvm/include/llvm/IR/IRBuilder.h
The file was modifiedllvm/lib/Analysis/AssumeBundleQueries.cpp
The file was modifiedclang/test/OpenMP/simd_metadata.c
Commit fbc06b228012f1f7939c2acae9d8435ffc9aeb2c by joker.eph
Revert "[MLIR] Parallelize affine.for op to 1-D affine.parallel op"

This reverts commit 5f2843857feee6fbf755c12c21698a4987eda5d1.
This broke the build when -DDBUILD_SHARED_LIBS=ON is used.
The file was addedmlir/test/Dialect/Affine/parallelism-detection.mlir
The file was addedmlir/test/lib/Dialect/Affine/TestParallelismDetection.cpp
The file was modifiedmlir/test/lib/Dialect/Affine/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Affine/Utils/Utils.cpp
The file was modifiedmlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Affine/Passes.td
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/Utils.h
The file was removedmlir/lib/Dialect/Affine/Transforms/AffineParallelize.cpp
The file was removedmlir/test/Dialect/Affine/parallelize.mlir
The file was modifiedmlir/include/mlir/Dialect/Affine/Passes.h
Commit 6c4a5e9257bac022ffe60e466686ba7fc96ffd1a by sstipanovic
[OpenMPOpt] ICV Tracking

This is the first and most basic ICV Tracking implementation. For this
first version, we only support deduplication within the same BB.

Reviewers: jdoerfert, JonChesterfield, hamax97, jhuber6, uenoku,
baziotis

Differential Revision: https://reviews.llvm.org/D81788
The file was modifiedllvm/test/Transforms/OpenMP/icv_tracking.ll
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
Commit 76123d338dc542d25cc9c4f20ddc49df1b9712cd by craig.topper
[DAGCombiner] visitSIGN_EXTEND_INREG should fold sext_vector_inreg(undef) to 0 not undef.

We need to ensure that the sign bits of the result all match
so we can't fold to undef.

Similar to PR46585.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D83163
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit fbbb6884e108419692a88e28eeeaa92cfbc08122 by lebedev.ri
[llvm-reduce] extractArgumentsFromModule(): don't crash when deleting instr twice

As it can be seen in newly-added (previously-crashing) test-case,
there can be a situation where multiple arguments are used in instr,
and we would schedule the same instruction to be deleted several times,
crashing when trying to delete it the second time.

We could either store WeakVH (done here), or use something set-like.
I think using WeakVH is prevalent in these cases elsewhere.
The file was addedllvm/test/Reduce/Inputs/remove-multiple-use-of-args-in-same-instruction.py
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
The file was addedllvm/test/Reduce/remove-multiple-use-of-args-in-same-instruction.ll
Commit f804bd586ee58199db4cfb2da8e9ef067425900b by lebedev.ri
[llvm-reduce] extractGVsFromModule(): don't crash when deleting instr twice

As it can be seen in newly-added (previously-crashing) test-case,
there can be a situation where multiple GV's are used in instr,
and we would schedule the same instruction to be deleted several times,
crashing when trying to delete it the second time.

We could either store WeakVH (done here), or use something set-like.
I think using WeakVH is prevalent in these cases elsewhere.
The file was addedllvm/test/Reduce/Inputs/remove-multiple-use-of-global-vars-in-same-instruction.py
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceGlobalVars.cpp
The file was addedllvm/test/Reduce/remove-multiple-use-of-global-vars-in-same-instruction.ll