[PATCH] D111034: [AArch64] Optimize add/sub with immediate

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 2 19:50:46 PDT 2021


benshi001 added a comment.

In D111034#3099892 <https://reviews.llvm.org/D111034#3099892>, @jaykang10 wrote:

> In D111034#3099847 <https://reviews.llvm.org/D111034#3099847>, @benshi001 wrote:
>
>> In D111034#3069427 <https://reviews.llvm.org/D111034#3069427>, @jaykang10 wrote:
>>
>>> Sorry, my patch could cause the problem. I have pushed a bug patch https://reviews.llvm.org/D109963. 
>>> Please wait a couple of days to verify the bug patch and then rebase your patch.
>>
>> I have rebased on your newest code and uploaded my patch, it works without any crashes on my localhost.
>>
>> So if there is no concerns within several days, I will commit my new patch and wait for blames (if there will be). ^_^
>
> Thanks for rebase and sorry for adding more codes to the pass.
>
> If possible, please check the bootstrap build and check-all on AArch64 machine to minimize the possibility of errors from AArch64 crews side. If you already did it, I am +1. :)

I have tested on RaspberryPi-4, there were two failures, but they seemed not related to my patch. So I will directly push my patch again.

  ******************** TEST 'SanitizerCommon-msan-aarch64-Linux :: Posix/lstat.cpp' FAILED ********************
  Script:
  --
  : 'RUN: at line 1';      /home/ben/llvm-project/build/./bin/clang  --driver-mode=g++ -gline-tables-only -fsanitize=memory    -funwind-tables  -ldl -O0 -g /home/ben/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/lstat.cpp -o /home/ben/llvm-project/build/projects/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/lstat.cpp.tmp &&  /home/ben/llvm-project/build/projects/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/lstat.cpp.tmp
  --
  Exit Code: 1
  
  Command Output (stderr):
  --
  ==1800722==WARNING: MemorySanitizer: use-of-uninitialized-value
      #0 0xaaaad5cd0154 in main /home/ben/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/lstat.cpp:14:3
      #1 0xffff8d5bc9d0 in __libc_start_main csu/../csu/libc-start.c:332:16
      #2 0xaaaad5c42cf4 in _start (/home/ben/llvm-project/build/projects/compiler-rt/test/sanitizer_common/msan-aarch64-Linux/Posix/Output/lstat.cpp.tmp+0x22cf4)
  
  SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/ben/llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/lstat.cpp:14:3 in main
  Exiting

Another failure was

  ********************
  FAIL: AddressSanitizer-Unit :: ./Asan-aarch64-inline-Test/AddressSanitizer.HugeMallocTest (329 of 79897)
  ******************** TEST 'AddressSanitizer-Unit :: ./Asan-aarch64-inline-Test/AddressSanitizer.HugeMallocTest' FAILED ********************
  Script:
  --
  /home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/./Asan-aarch64-inline-Test --gtest_filter=AddressSanitizer.HugeMallocTest
  --
  Note: Google Test filter = AddressSanitizer.HugeMallocTest
  [==========] Running 1 test from 1 test suite.
  [----------] Global test environment set-up.
  [----------] 1 test from AddressSanitizer
  [ RUN      ] AddressSanitizer.HugeMallocTest
  /home/ben/llvm-project/compiler-rt/lib/asan/tests/asan_test.cpp:333: Failure
  Death test: Ident((char*)malloc(n_megs << 20))[-1] = 0
      Result: died but not with expected error.
    Expected: contains regular expression "is located 1 bytes to the left|AddressSanitizer failed to allocate"
  Actual msg:
  [  DEATH   ] =================================================================
  [  DEATH   ] ==1495343==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x100400000 bytes
  [  DEATH   ]     #0 0x4df25c  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x4df25c)
  [  DEATH   ]     #1 0x5e4a94  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x5e4a94)
  [  DEATH   ]     #2 0x59cfbc  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x59cfbc)
  [  DEATH   ]     #3 0x53d1e4  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x53d1e4)
  [  DEATH   ]     #4 0x540b50  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x540b50)
  [  DEATH   ]     #5 0x54208c  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x54208c)
  [  DEATH   ]     #6 0x568174  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x568174)
  [  DEATH   ]     #7 0x59f0d4  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x59f0d4)
  [  DEATH   ]     #8 0x5671ac  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x5671ac)
  [  DEATH   ]     #9 0x6b8d20  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x6b8d20)
  [  DEATH   ]     #10 0xffffa3d7c9d0  (/lib/aarch64-linux-gnu/libc.so.6+0x249d0)
  [  DEATH   ]     #11 0x447b34  (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x447b34)
  [  DEATH   ]
  [  DEATH   ] ==1495343==HINT: if you don't care about these errors you may set allocator_may_return_null=1
  [  DEATH   ] SUMMARY: AddressSanitizer: out-of-memory (/home/ben/llvm-project/build/projects/compiler-rt/lib/asan/tests/AARCH64LinuxConfig/Asan-aarch64-inline-Test+0x4df25c)
  [  DEATH   ] ==1495343==ABORTING
  [  DEATH   ]
  [  FAILED  ] AddressSanitizer.HugeMallocTest (67 ms)
  [----------] 1 test from AddressSanitizer (68 ms total)
  
  [----------] Global test environment tear-down
  [==========] 1 test from 1 test suite ran. (70 ms total)
  [  PASSED  ] 0 tests.
  [  FAILED  ] 1 test, listed below:
  [  FAILED  ] AddressSanitizer.HugeMallocTest
  
   1 FAILED TEST


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111034/new/

https://reviews.llvm.org/D111034



More information about the llvm-commits mailing list