SuccessChanges

Summary

  1. Added "auto" for LLVMBuildFactory enable_runtimes arg; changed default to not use enable_runtimes. (details)
Commit f7b888457641941a8e6024f36ee2e5ddc53695d5 by gkistanova
Added "auto" for LLVMBuildFactory enable_runtimes arg; changed default to not use enable_runtimes.
The file was modifiedzorg/buildbot/process/factory.py (diff)

Summary

  1. Revert "[InstSimplify] Added tests for PR50173, NFC" (details)
  2. [MC] Add MCAsmParser::parseComma to improve diagnostics (details)
  3. [AMDGPU] Fix lit failure introduced by 6a17609157196878b9cd9aa9ce71bde247ca14db (details)
  4. [mlir][tosa] Fix tosa.concat by inserting linalg.fill after linalg.init (details)
  5. [VPlan] Properly handle sinking of replicate regions. (details)
  6. [mlir] Fix region successor bug in forward dataflow analysis (details)
  7. [AMDGPU] Add rm line to lit test to cleanup bots (details)
  8. [libc++] Revert the std::to_address change to avoid relying on element_type. (details)
  9. [clang][test] Update -fc++-abi tests (details)
  10. [dfsan] move dfsan_flags.h to cc files (details)
  11. [lldb] Refactor argument group by SourceLocationSpec (NFCI) (details)
  12. [WebAssembly] Add codegen test for wasm_simd128.h (details)
  13. [OpenMP][NFC] Refactor Clang OpenMP tests using update_cc_test_checks (details)
  14. [loop-idiom] Hoist loop memcpys to loop preheader (details)
Commit 62fcda93788a93726f7bc7cb5c0699595e009ceb by Dávid Bolvanský
Revert "[InstSimplify] Added tests for PR50173, NFC"

This reverts commit 4e7a4c73dab6605f4fcc7bf09c2ee85e7925f6d7. Not needed, pattern is handled by instcombine already.
The file was modifiedllvm/test/Transforms/InstSimplify/call.ll
Commit 7cac6a9d7a1d637bf6a0701ec56c69d2b58fda69 by i
[MC] Add MCAsmParser::parseComma to improve diagnostics

llvm-mc will error "expected comma" instead of "unexpected token".
The file was modifiedllvm/include/llvm/MC/MCParser/MCAsmParser.h
The file was modifiedllvm/test/MC/AsmParser/directive_dcb.s
The file was modifiedllvm/test/MC/ELF/cfi.s
The file was modifiedllvm/lib/MC/MCParser/AsmParser.cpp
Commit a018bd51998df808b0e4eceb5edea9ba84488864 by baptiste.saleil
[AMDGPU] Fix lit failure introduced by 6a17609157196878b9cd9aa9ce71bde247ca14db
The file was modifiedllvm/test/CodeGen/AMDGPU/llc-pipeline.ll
Commit 1f7adf8cb1d77ba35b8fa322c93d0d88a4cdc1f0 by rob.suderman
[mlir][tosa] Fix tosa.concat by inserting linalg.fill after linalg.init

All linalg.init operations must be fed into a linalg operation before
subtensor. The inserted linalg.fill guarantees it executes correctly.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D101848
The file was modifiedmlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
The file was modifiedmlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir
Commit ccebf7a1096a887e29d1f765cf6b27878466d0f4 by flo
[VPlan] Properly handle sinking of replicate regions.

This patch updates the code that sinks recipes required for first-order
recurrences to properly handle replicate-regions. At the moment, the
code would just move the replicate recipe out of its replicate-region,
producing an invalid VPlan.

When sinking a recipe in a replicate-region, we have to sink the whole
region. To do that, we first need to split the block at the target
recipe and move the region in between.

This patch also adds a splitAt helper to VPBasicBlock to split a
VPBasicBlock at a given iterator.

Fixes PR50009.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D100751
The file was addedllvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit c1c1df6347bff3167e9aa795b508f56b8fe5fbc1 by riddleriver
[mlir] Fix region successor bug in forward dataflow analysis

We weren't properly visiting region successors when the terminator wasn't return like, which could create incorrect results in the analysis. This revision ensures that we properly visit region successors, to avoid optimistically assuming a value is constant when it isn't.

Differential Revision: https://reviews.llvm.org/D101783
The file was modifiedmlir/lib/Analysis/DataFlowAnalysis.cpp
The file was modifiedmlir/test/Transforms/sccp-structured.mlir
Commit 845c8a60e9f3f6ce9bd8e7d312438f8824fbfdac by baptiste.saleil
[AMDGPU] Add rm line to lit test to cleanup bots
The file was modifiedllvm/test/CodeGen/AMDGPU/llc-pipeline.ll
Commit 347f69c55f45acd80070f522bed7417d402f84b0 by Louis Dionne
[libc++] Revert the std::to_address change to avoid relying on element_type.

This reverts commit da456167, which broke the Clang build. I'm able to
reproduce it but I want to give myself a bit more time to investigate.

Differential Revision: https://reviews.llvm.org/D101638
The file was modifiedlibcxx/test/std/utilities/memory/pointer.conversion/to_address.pass.cpp
The file was modifiedlibcxx/include/__memory/pointer_traits.h
The file was modifiedlibcxx/include/iterator
The file was removedlibcxx/test/libcxx/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp
The file was removedlibcxx/test/libcxx/utilities/memory/pointer.conversion/to_address.pass.cpp
The file was removedlibcxx/test/std/utilities/memory/pointer.conversion/to_address_std_iterators.pass.cpp
Commit 0277a24f4bbac284ba7a2ace7eeefdf6305e7f69 by leonardchan
[clang][test] Update -fc++-abi tests

This attempts to move driver tests out of Frontend and to Driver, separates
RUNs that should fail from RUNs that should succeed, and prevent creating
output files or dumping output.

Differential Revision: https://reviews.llvm.org/D101867
The file was addedclang/test/Driver/cxx-abi-flag.cpp
The file was modifiedclang/test/Frontend/invalid-cxx-abi.cpp
The file was addedclang/test/Frontend/valid-cxx-abi.cpp
Commit 36cec26b38573bccbf6a7ff9f661441276b8f545 by jianzhouzh
[dfsan] move dfsan_flags.h to cc files

D101666 needs this change.

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D101857
The file was modifiedcompiler-rt/lib/dfsan/dfsan.h
The file was modifiedcompiler-rt/lib/dfsan/dfsan_custom.cpp
Commit 3e2ed7440569d59e073d4799b310255547bd2dd2 by medismail.bennani
[lldb] Refactor argument group by SourceLocationSpec (NFCI)

This patch refactors a good part of the code base turning the usual
FileSpec, Line, Column, CheckInlines, ExactMatch arguments into a
SourceLocationSpec object.

This change is required for a following patch that will add handling of the
column line information when doing symbol resolution.

Differential Revision: https://reviews.llvm.org/D100965

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
The file was modifiedlldb/source/API/SBThread.cpp
The file was modifiedlldb/source/Symbol/CompileUnit.cpp
The file was modifiedlldb/include/lldb/Core/AddressResolverFileLine.h
The file was modifiedlldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
The file was modifiedlldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
The file was modifiedlldb/source/Symbol/SymbolFile.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
The file was modifiedlldb/source/Breakpoint/Breakpoint.cpp
The file was modifiedlldb/source/Breakpoint/BreakpointResolver.cpp
The file was modifiedlldb/source/Breakpoint/BreakpointResolverFileLine.cpp
The file was modifiedlldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
The file was modifiedlldb/unittests/Symbol/TestLineEntry.cpp
The file was modifiedlldb/source/Symbol/LineTable.cpp
The file was modifiedlldb/include/lldb/Breakpoint/BreakpointResolver.h
The file was modifiedlldb/include/lldb/Symbol/SymbolFile.h
The file was modifiedlldb/source/Core/Module.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
The file was modifiedlldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
The file was modifiedlldb/include/lldb/Symbol/LineTable.h
The file was modifiedlldb/source/Target/Target.cpp
The file was modifiedlldb/source/Core/AddressResolverFileLine.cpp
The file was modifiedlldb/include/lldb/Symbol/CompileUnit.h
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
Commit f3b769e82ff3340e96c2e50ac2bd6361fbc3d797 by tlively
[WebAssembly] Add codegen test for wasm_simd128.h

We previously did not have tests demonstrating that the intrinsics in
wasm_simd128.h lower to reasonable LLVM IR. This commit adds such a test.

Differential Revision: https://reviews.llvm.org/D101805
The file was modifiedclang/test/Headers/wasm.c
Commit 956cae2f09b21429dbcb02066c99e35a239aa4bf by georgakoudis1
[OpenMP][NFC] Refactor Clang OpenMP tests using update_cc_test_checks

This patch refactors a subset of Clang OpenMP tests, generating checklines using the update_cc_test_checks script. This refactoring facilitates updating the Clang OpenMP code generation codebase by automating test generation.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D101849
The file was modifiedclang/test/OpenMP/parallel_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_if_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_codegen.cpp
The file was modifiedclang/test/OpenMP/task_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_debug_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_distribute_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp
The file was modifiedclang/test/OpenMP/task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_if_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_if_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/sections_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/for_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/master_taskloop_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_map_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_thread_limit_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_codegen.cpp
The file was modifiedclang/test/OpenMP/single_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/single_private_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_codegen.cpp
The file was modifiedclang/test/OpenMP/sections_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_copyin_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_for_linear_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_sections_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/sections_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_if_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_copyin_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_nested_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/task_if_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_num_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/single_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/sections_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_private_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/for_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_private_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_private_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/target_map_codegen_03.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/for_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/tile_codegen.cpp
The file was modifiedclang/test/OpenMP/debug-info-complex-byval.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_allocate_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_teams_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/master_taskloop_simd_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_codegen.cpp
The file was modifiedclang/test/OpenMP/declare_target_codegen_globalization.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/cancel_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_multi_target_parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/for_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/taskloop_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/for_linear_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_taskloop_simd_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_master_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/vla_crash.c
The file was modifiedclang/test/OpenMP/ordered_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/for_reduction_codegen_UDR.cpp
The file was modifiedclang/test/OpenMP/parallel_for_lastprivate_conditional.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_if_codegen.cpp
The file was modifiedclang/test/OpenMP/cancellation_point_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_firstprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_private_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_lambda_capturing.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_data_sharing.cpp
The file was modifiedclang/test/OpenMP/taskloop_simd_in_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/target_parallel_for_debug_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_dist_schedule_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp
The file was modifiedclang/test/OpenMP/sections_lastprivate_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_order_codegen.cpp
The file was modifiedclang/test/OpenMP/openmp_win_codegen.cpp
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_sections_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_codegen.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_reduction_task_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_codegen.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_if_codegen.cpp
The file was modifiedclang/test/OpenMP/debug-info-openmp-array.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_private_codegen.cpp
The file was modifiedclang/test/OpenMP/target_codegen_global_capture.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_lastprivate_codegen.cpp
Commit da1cdffbb1b729d221360a76e1c0793992b05dfc by zhuhan7737
[loop-idiom] Hoist loop memcpys to loop preheader

For a simple loop like:
```
struct S {
  int x;
  int y;
  char b;
};

unsigned foo(S* __restrict__ a, S* b, int n) {
  for (int i = 0; i < n; i++)
    a[i] = b[i];

  return sizeof(a[0]);
}
```
We could eliminate the loop and convert it to a large memcpy of 12*n bytes. Currently this is not handled. Output of `opt -loop-idiom -S < memcpy_before.ll`
```
%struct.S = type { i32, i32, i8 }

define dso_local i32 @_Z3fooP1SS0_i(%struct.S* noalias nocapture %a, %struct.S* nocapture readonly %b, i32 %n) local_unnamed_addr {
entry:
  %cmp7 = icmp sgt i32 %n, 0
  br i1 %cmp7, label %for.body.preheader, label %for.cond.cleanup

for.body.preheader:                               ; preds = %entry
  br label %for.body

for.cond.cleanup.loopexit:                        ; preds = %for.body
  br label %for.cond.cleanup

for.cond.cleanup:                                 ; preds = %for.cond.cleanup.loopexit, %entry
  ret i32 12

for.body:                                         ; preds = %for.body, %for.body.preheader
  %i.08 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]
  %idxprom = zext i32 %i.08 to i64
  %arrayidx = getelementptr inbounds %struct.S, %struct.S* %b, i64 %idxprom
  %arrayidx2 = getelementptr inbounds %struct.S, %struct.S* %a, i64 %idxprom
  %0 = bitcast %struct.S* %arrayidx2 to i8*
  %1 = bitcast %struct.S* %arrayidx to i8*
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* nonnull align 4 dereferenceable(12) %0, i8* nonnull align 4 dereferenceable(12) %1, i64 12, i1 false)
  %inc = add nuw nsw i32 %i.08, 1
  %cmp = icmp slt i32 %inc, %n
  br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit
}

; Function Attrs: argmemonly nofree nosync nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #0

attributes #0 = { argmemonly nofree nosync nounwind willreturn }

```
The loop idiom pass currently only handles load and store instructions. Since struct S is too big to fit in a register, the loop body contains a memcpy intrinsic.

With this change, re-run `opt -loop-idiom -S < memcpy_before.ll`. The loop memcpy is promoted to loop preheader. For this trivial case, the loop is dead and will be removed by another pass.
```
%struct.S = type { i32, i32, i8 }

define dso_local i32 @_Z3fooP1SS0_i(%struct.S* noalias nocapture %a, %struct.S* nocapture readonly %b, i32 %n) local_unnamed_addr {
entry:
  %a1 = bitcast %struct.S* %a to i8*
  %b2 = bitcast %struct.S* %b to i8*
  %cmp7 = icmp sgt i32 %n, 0
  br i1 %cmp7, label %for.body.preheader, label %for.cond.cleanup

for.body.preheader:                               ; preds = %entry
  %0 = zext i32 %n to i64
  %1 = mul nuw nsw i64 %0, 12
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %a1, i8* align 4 %b2, i64 %1, i1 false)
  br label %for.body

for.cond.cleanup.loopexit:                        ; preds = %for.body
  br label %for.cond.cleanup

for.cond.cleanup:                                 ; preds = %for.cond.cleanup.loopexit, %entry
  ret i32 12

for.body:                                         ; preds = %for.body, %for.body.preheader
  %i.08 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]
  %idxprom = zext i32 %i.08 to i64
  %arrayidx = getelementptr inbounds %struct.S, %struct.S* %b, i64 %idxprom
  %arrayidx2 = getelementptr inbounds %struct.S, %struct.S* %a, i64 %idxprom
  %2 = bitcast %struct.S* %arrayidx2 to i8*
  %3 = bitcast %struct.S* %arrayidx to i8*
  %inc = add nuw nsw i32 %i.08, 1
  %cmp = icmp slt i32 %inc, %n
  br i1 %cmp, label %for.body, label %for.cond.cleanup.loopexit
}

; Function Attrs: argmemonly nofree nosync nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #0

attributes #0 = { argmemonly nofree nosync nounwind willreturn }
```

Reviewed By: zino

Differential Revision: https://reviews.llvm.org/D97667
The file was addedllvm/test/Transforms/LoopIdiom/memcpy-intrinsic.ll
The file was modifiedllvm/test/Transforms/LoopIdiom/memcpy-debugify-remarks.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
The file was modifiedllvm/test/Transforms/LoopIdiom/memset-debugify-remarks.ll
The file was addedllvm/test/Transforms/LoopIdiom/memcpy-intrinsic-different-types.ll