1. Feb 21, 2022
  2. Feb 20, 2022
  3. Feb 19, 2022
    • Simon Pilgrim's avatar
      [X86] Add some add reduction tests for values that are zero in the upper bits · f6ee45e9
      Simon Pilgrim authored
      This is an extension of some of the tests mentioned in Issue #42019 - we might be able to use PSADBW to add+zext 4 x bytes to i64 that can then be reduced
      f6ee45e9
    • Micah Weston's avatar
      [AArch64] Adds SUBS and ADDS instructions to the MIPeepholeOpt. · c69af70f
      Micah Weston authored
      Implements ADDS/SUBS 24-bit immediate optimization using the
      MIPeepholeOpt pass. This follows the pattern:
      
      Optimize ([adds|subs] r, imm) -> ([ADDS|SUBS] ([ADD|SUB] r, #imm0, lsl #12), #imm1),
      if imm == (imm0<<12)+imm1. and both imm0 and imm1 are non-zero 12-bit unsigned
      integers.
      
      Optimize ([adds|subs] r, imm) -> ([SUBS|ADDS] ([SUB|ADD] r, #imm0, lsl #12), #imm1),
      if imm == -(imm0<<12)-imm1, and both imm0 and imm1 are non-zero 12-bit unsigned
      integers.
      
      The SplitAndOpcFunc type had to change the return type to an Opcode pair so that
      the first add/sub is the regular instruction and the second is the flag setting
      instruction. This required updating the code in the AND case.
      
      Testing:
      
      I ran a two stage bootstrap with this code.
      Using the second stage compiler, I verified that the negation of an ADDS to SUBS
      or vice versa is a valid optimization. Example V == -0x111111.
      
      Reviewed By: dmgreen
      
      Differential Revision: https://reviews.llvm.org/D118663
      c69af70f
    • David Green's avatar
      [AArch64] Common patterns between UMULL and int_aarch64_neon_umull · b8801ba0
      David Green authored
      We have some duplicate patterns between the AArch64ISD::UMULL (/SMULL)
      and the int_aarch64_neon_umull (/smull) intrinsics. They did not
      replicate all the patterns though, leaving some gaps on instructions
      like umlal2 from codegen. This commons all the patterns by converting
      all int_aarch64_neon_umull intrinsics to UMULL nodes and removing the
      duplicate for umull/smull intrinsics, so that all instructions go
      through the same tablegen pattern.
      
      This improves some of the longer-than-legal mla patterns, helping them
      replace ext with umlal2.
      
      Differential Revision: https://reviews.llvm.org/D119887
      b8801ba0
    • Simon Pilgrim's avatar
      4a01ec40
    • Simon Pilgrim's avatar
      a54b56ec
    • Simon Pilgrim's avatar
      f60d101b
    • fourdim's avatar
      [docs] HowToCrossCompileLLVM.rst: update cmake options · bc53ebbd
      fourdim authored
      This patch updates the cmake options suggested when cross compiling. This should fix [#52819](https://github.com/llvm/llvm-project/issues/52819).
      
      Brad King (Member of CMake) says:
      
      The linked [CMAKE_CROSSCOMPILING](https://cmake.org/cmake/help/v3.22/variable/CMAKE_CROSSCOMPILING.html) documentation says:
      
      This variable will be set to true by CMake if the `CMAKE_SYSTEM_NAME` variable has been set manually (i.e. in a toolchain file or as a cache entry from the cmake command line).
      
      It is not meant to be set by project code or toolchain files. It is always set automatically. Don't put `set(CMAKE_CROSSCOMPILING ON)` anywhere in your code.
      
      `CMAKE_CROSSCOMPILING` indicates only whether `CMAKE_SYSTEM_NAME` was set by the user/project/toolchain-file instead of by CMake.
      
      In LLVM project, `CMAKE_CROSSCOMPILING` is used to determine whether to execute some tests on the host machine.
      
      LLVM needs to use another method for that. `CMAKE_CROSSCOMPILING` is not a reliable indicator of whether produced binaries will run on the host, and does not claim so in its documentation. If one sets `CMAKE_SYSTEM_NAME` to Linux in a toolchain file, and builds on a Linux host, that doesn't mean the target architecture or minimum glibc version is the same.
      
      Reviewed By: rengolin
      
      Differential Revision: https://reviews.llvm.org/D119804
      bc53ebbd
    • Benjamin Kramer's avatar
      [CodeGen] Make ShapeT::operator== const. NFC. · 9106b5e5
      Benjamin Kramer authored
      Otherwise it becomes asymmetric in the types it accepts.
      9106b5e5