This adds support for the case where
WideSize = DstSize + K * SrcSize
In this case, we can pad the G_MERGE_VALUES instruction with K extra undef values with width SrcSize. Then the destination can be handled via widenScalarDst.
Differential D106814
[GlobalISel] Add scalar widening for G_MERGE_VALUES destination Authored by paquette on Jul 26 2021, 11:40 AM.
Details This adds support for the case where WideSize = DstSize + K * SrcSize In this case, we can pad the G_MERGE_VALUES instruction with K extra undef values with width SrcSize. Then the destination can be handled via widenScalarDst.
Diff Detail
Event TimelineComment Actions Looks like this patch broke the MSan buildbots: https://lab.llvm.org/buildbot/#/builders/5/builds/9643 You might find the instructions at https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild helpful, as the MSan bot requires multiple stages of compilation. FAIL: LLVM :: CodeGen/AArch64/GlobalISel/legalize-constant.mir (77964 of 77964)
******************** TEST 'LLVM :: CodeGen/AArch64/GlobalISel/legalize-constant.mir' FAILED ********************
Script:
--
: 'RUN: at line 2'; /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/llc -O0 -mtriple aarch64 -run-pass=legalizer -verify-machineinstrs /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/AArch64/GlobalISel/legalize-constant.mir -o - | /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/AArch64/GlobalISel/legalize-constant.mir
--
Exit Code: 2
Command Output (stderr):
--
==77619==ERROR: MemorySanitizer: requested allocation size 0x2827fffd8 exceeds maximum supported size of 0x200000000
<empty stack>
==77619==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: MemorySanitizer: allocation-size-too-big
FileCheck error: '<stdin>' is empty.
FileCheck command line: /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/CodeGen/AArch64/GlobalISel/legalize-constant.mir
--
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
********************
Failed Tests (1):
LLVM :: CodeGen/AArch64/GlobalISel/legalize-constant.mirComment Actions Also made that same test hang in an infinite loop on my linux box, and fail on my m1 mac: http://45.33.8.238/macm1/14850/step_11.txt Comment Actions Not sure why I didn't catch that. Looks like this infinite loops with the artifact combiner, which tries to combine G_TRUNC(G_MERGE_VALUES) -> G_MERGE_VALUES. :( |