Skip to content
  1. Feb 22, 2021
  2. Feb 21, 2021
  3. Feb 20, 2021
    • Petr Hosek's avatar
      [InstrProfiling] Use nobits as __llvm_prf_cnts section type in ELF · 6b286d93
      Petr Hosek authored
      This can reduce the binary size because counters will no longer occupy
      space in the binary, instead they will be allocated by dynamic linker.
      
      Differential Revision: https://reviews.llvm.org/D97110
      6b286d93
    • Craig Topper's avatar
      [RISCV] Add another test case showing failure to use remw when the RHS has... · 038bd147
      Craig Topper authored
      [RISCV] Add another test case showing failure to use remw when the RHS has been zero extended from less than i32. NFC
      038bd147
    • Nikita Popov's avatar
      [ConstantRange] Handle wrapping ranges in min/max (PR48643) · a852234f
      Nikita Popov authored
      When one of the inputs is a wrapping range, intersect with the
      union of the two inputs. The union of the two inputs corresponds
      to the result we would get if we treated the min/max as a simple
      select.
      
      This fixes PR48643.
      a852234f
    • Sanjay Patel's avatar
      [InstCombine] fold fdiv with exp/exp2 divisor (PR49147) · e772618f
      Sanjay Patel authored
      Follow-up to:
      D96648 / b40fde06
      ...for the special-case base calls.
      
      From the earlier commit:
      This is unusual in the general (non-reciprocal) case because we need
      an extra instruction, but that should be better for general FP
      reassociation and codegen. We conservatively check for "arcp" FMF
      here as we do with existing fdiv folds, but it is not strictly
      necessary to have that.
      e772618f
    • Sanjay Patel's avatar
      fbca27bf
    • Nikita Popov's avatar
      [ConstantRange] Handle wrapping range in binaryNot() · b6088f74
      Nikita Popov authored
      We don't need any special handling for wrapping ranges (or empty
      ranges for that matter). The sub() call will already compute a
      correct and precise range.
      
      We only need to adjust the test expectation: We're now computing
      an optimal result, rather than an unsigned envelope.
      b6088f74
    • Craig Topper's avatar
      [RISCV] Add an additional remw test to rv64m-exhaustive-w-insts.ll. NFC · 09966a66
      Craig Topper authored
      This adds the IR for this C code
      
      int32_t foo(uint16_t x, int16_t y) {
        x %= y;
        return x;
      }
      
      Note the dividend is unsigned and the divisor is signed. C type
      promotion rules will extend them and use a 32-bit srem and the
      function returns a 32-bit result.
      
      We fail to use remw for this case. The zero extended input has
      enough sign bits, but we won't consider (i64 AssertZext X, i16) in
      the sexti32 isel pattern.
      
      We also end up with a extra shifts to zero upper bits on the result.
      computeKnownBits knew the result was positive before type legalization
      and allowed the SIGN_EXTEND to become ZERO_EXTEND. But after promoting
      to i64 we no longer know that bit 31 (and all bits above it) should
      be 0.
      09966a66
    • Nikita Popov's avatar
      [ConstantRangeTest] Print detailed information on failure (NFC) · 5ec75c60
      Nikita Popov authored
      When the optimality check fails, print the inputs, the computed
      range and the better range that was found. This makes it much
      simpler to identify the cause of the failure.
      
      Make sure that full ranges (which, unlikely all the other cases,
      have multiple ways to construct them that all result in the same
      range) only print one message by handling them separately.
      5ec75c60
Loading