Skip to content
  1. Jan 15, 2020
    • Zhongduo Lin's avatar
      [NFC][IndVarSimplify] remove duplicate code in widenWithVariantLoadUseCodegen. · 34ba96a3
      Zhongduo Lin authored
      Summary: Duplicate code in widenWithVariantLoadUseCodegen is removed and also use assert to check unknown extension type as it should be filtered out by the pre condition check before calling this function.
      
      Reviewers: az, sanjoy, sebpop, efriedma, javed.absar, sanjoy.google
      
      Reviewed By: efriedma
      
      Subscribers: hiraditya, llvm-commits, amehsan
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D72652
      34ba96a3
    • Vedant Kumar's avatar
      DebugInfo: Factor out logic to update locations in MD_loop metadata, NFC · a2cc80bc
      Vedant Kumar authored
      Factor out the logic needed to update debug locations contained within
      MD_loop metadata.
      
      This refactor is preparation for a future change that also needs to
      rewrite MD_loop metadata.
      
      rdar://45507940
      a2cc80bc
    • Arkady Shlykov's avatar
      [Loop Peeling] Add possibility to enable peeling on loop nests. · 3f3017e1
      Arkady Shlykov authored
      Summary:
      Current peeling implementation bails out in case of loop nests.
      The patch introduces a field in TargetTransformInfo structure that
      certain targets can use to relax the constraints if it's
      profitable (disabled by default).
      Also additional option is added to enable peeling manually for
      experimenting and testing purposes.
      
      Reviewers: fhahn, lebedev.ri, xbolva00
      
      Reviewed By: xbolva00
      
      Subscribers: xbolva00, hiraditya, zzheng, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D70304
      3f3017e1
    • Sanjay Patel's avatar
      [InstCombine] reassociate fsub+fsub into fsub+fadd · 3180af43
      Sanjay Patel authored
      As discussed in the motivating PR44509:
      https://bugs.llvm.org/show_bug.cgi?id=44509
      
      ...we can end up with worse code using fast-math than without.
      This is because the reassociate pass greedily transforms fsub
      into fneg/fadd and apparently (based on the regression tests
      seen here) expects instcombine to clean that up if it wasn't
      profitable. But we were missing this fold:
      
      (X - Y) - Z --> X - (Y + Z)
      
      There's another, more specific case that I think we should
      handle as shown in the "fake" fneg test (but missed with a real
      fneg), but that's another patch. That may be tricky to get
      right without conflicting with existing transforms for fneg.
      
      Differential Revision: https://reviews.llvm.org/D72521
      3180af43
    • Hideto Ueno's avatar
      [Attributor] AAValueConstantRange: Value range analysis using constant range · 188f9a34
      Hideto Ueno authored
      Summary:
      This patch introduces `AAValueConstantRange`, which answers a possible range for integer value in a specific program point.
      One of the motivations is propagating existing `range` metadata. (I think we need to change the situation that `range` metadata cannot be put to Argument).
      
      The state is a tuple of `ConstantRange` and it is initialized to (known, assumed) = ([-∞, +∞], empty).
      
      Currently, AAValueConstantRange is created in `getAssumedConstant` method when `AAValueSimplify` returns `nullptr`(worst state).
      
      Supported
       - BinaryOperator(add, sub, ...)
       - CmpInst(icmp eq, ...)
       - !range metadata
      
      `AAValueConstantRange` is not intended to extend to polyhedral range value analysis.
      
      Reviewers: jdoerfert, sstefan1
      
      Reviewed By: jdoerfert
      
      Subscribers: phosek, davezarzycki, baziotis, hiraditya, javed.absar, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D71620
      188f9a34
  2. Jan 14, 2020
  3. Jan 13, 2020
  4. Jan 11, 2020
  5. Jan 10, 2020
  6. Jan 09, 2020
  7. Jan 08, 2020
  8. Jan 07, 2020
    • Sanjay Patel's avatar
      [InstCombine] try to pull 'not' of select into compare operands · f8962571
      Sanjay Patel authored
      not (select ?, (cmp TPred, ?, ?), (cmp FPred, ?, ?) -->
           select ?, (cmp TPred', ?, ?), (cmp FPred', ?, ?)
      
      If both sides of the select are cmps, we can remove an instruction.
      The case where only side is a cmp is deferred to a possible
      follow-on patch.
      
      We have a more general 'isFreeToInvert' analysis, but I'm not seeing
      a way to use that more widely without inducing infinite looping
      (opposing transforms).
      Here, we flip the compare predicates directly, so we should not have
      any danger by creating extra intermediate 'not' ops.
      
      Alive proofs:
      https://rise4fun.com/Alive/jKa
      
      Name: both select values are compares - invert predicates
        %tcmp = icmp sle i32 %x, %y
        %fcmp = icmp ugt i32 %z, %w
        %sel = select i1 %cond, i1 %tcmp, i1 %fcmp
        %not = xor i1 %sel, true
      =>
        %tcmp_not = icmp sgt i32 %x, %y
        %fcmp_not = icmp ule i32 %z, %w
        %not = select i1 %cond, i1 %tcmp_not, i1 %fcmp_not
      
      Name: false val is compare - invert/not
        %fcmp = icmp ugt i32 %z, %w
        %sel = select i1 %cond, i1 %tcmp, i1 %fcmp
        %not = xor i1 %sel, true
      =>
        %tcmp_not = xor i1 %tcmp, -1
        %fcmp_not = icmp ule i32 %z, %w
        %not = select i1 %cond, i1 %tcmp_not, i1 %fcmp_not
      
      Differential Revision: https://reviews.llvm.org/D72007
      f8962571
    • Simon Pilgrim's avatar
    • Fangrui Song's avatar
      Add Triple::isX86() · 6904cd94
      Fangrui Song authored
      Reviewed By: craig.topper, skan
      
      Differential Revision: https://reviews.llvm.org/D72247
      6904cd94
Loading