Skip to content
  1. Feb 08, 2018
    • Craig Topper's avatar
      [DAGCombiner] Fix a couple mistakes from r324311 by really passing the... · c19aed96
      Craig Topper authored
      [DAGCombiner] Fix a couple mistakes from r324311 by really passing the original load to ExtendSetCCUses.
      
      We're passing the binary op that uses the load instead of the load.
      
      Noticed by inspection. Not sure how to test this because this just prevents the introduction of an extend that will later be truncated and will probably be combined out.
      
      llvm-svn: 324568
      c19aed96
    • Craig Topper's avatar
      [DAGCombiner] Don't create truncate nodes in (aext (zextload x)) -> (zextload... · 9b9d5274
      Craig Topper authored
      [DAGCombiner] Don't create truncate nodes in (aext (zextload x)) -> (zextload x) and similar folds. NFCI
      
      The truncate is being used to replace other users of of the load, but we checked that the load only has one use so there are no other uses to replace.
      
      llvm-svn: 324567
      9b9d5274
    • Peter Collingbourne's avatar
      ARM: Remove dead code. NFCI. · 559ff1fe
      Peter Collingbourne authored
      llvm-svn: 324565
      559ff1fe
    • Francis Visoiu Mistrih's avatar
      [CodeGen] Print MachineBasicBlock labels using MIR syntax in -debug output · da89d181
      Francis Visoiu Mistrih authored
      Instead of:
      
      %bb.1: derived from LLVM BB %for.body
      
      print:
      
      bb.1.for.body:
      
      Also use MIR syntax for MBB attributes like "align", "landing-pad", etc.
      
      llvm-svn: 324563
      da89d181
    • Craig Topper's avatar
      [DAGCombiner] Avoid creating truncate nodes in (zext (and (load)))->(and... · cbfe41ac
      Craig Topper authored
      [DAGCombiner] Avoid creating truncate nodes in (zext (and (load)))->(and (zextload)) fold until we know for sure we're going to need it. NFCI
      
      The truncate is only needed if the load has additional users. It used to get passed to extendSetCCUses so was created early, but that's no longer the case.
      
      llvm-svn: 324562
      cbfe41ac
    • Craig Topper's avatar
      [DAGCombiner] Rename variable to be slightly better. NFC · bf4ed426
      Craig Topper authored
      We were calling a load LN0 but it came from N0.getOperand(0) so its really more like LN00 if we follow the name used in other places.
      
      llvm-svn: 324561
      bf4ed426
    • Yonghong Song's avatar
      bpf: Improve expanding logic in LowerSELECT_CC · f2075aef
      Yonghong Song authored
      
      
      LowerSELECT_CC is not generating optimal Select_Ri pattern at the moment. It
      is not guaranteed to place ConstantNode at RHS which would miss matching
      Select_Ri.
      
      A new testcase added into the existing select_ri.ll, also there is an
      existing case in cmp.ll which would be improved to use Select_Ri after this
      patch, it is adjusted accordingly.
      
      Reported-by: default avatarAlexei Starovoitov <alexei.starovoitov@gmail.com>
      Reviewed-by: default avatarYonghong Song <yhs@fb.com>
      Signed-off-by: default avatarJiong Wang <jiong.wang@netronome.com>
      llvm-svn: 324560
      f2075aef
    • Peter Collingbourne's avatar
      gold-plugin: Do not set codegen opt level based on LTO opt level. · bae5918d
      Peter Collingbourne authored
      The LTO opt level should not affect the codegen opt level, and indeed
      it does not affect it in lld. Ideally the codegen opt level should
      be controlled by an IR-level attribute based on the compile-time opt
      level, but that hasn't been implemented yet.
      
      Differential Revision: https://reviews.llvm.org/D43040
      
      llvm-svn: 324557
      bae5918d
    • Matt Arsenault's avatar
      AMDGPU: Fix incorrect reordering when inline asm defines LDS address · b02cebf5
      Matt Arsenault authored
      Defs of operands outside of the instruction's explicit defs need
      to be checked.
      
      llvm-svn: 324554
      b02cebf5
    • Rafael Espindola's avatar
      Fix PR36268. · 362fccf1
      Rafael Espindola authored
      The issue is that clang was first creating a extern_weak hidden GV and
      then changing the linkage to external.
      
      Once we know it is not extern_weak we know it must be dso_local.
      
      This patch refactors the code that sets the implicit dso_local to a
      helper private function that is used every time we change the linkage
      or visibility.
      
      I will commit a patch to clang in a minute.
      
      llvm-svn: 324551
      362fccf1
    • Matt Arsenault's avatar
      AMDGPU: Don't crash when trying to fold implicit operands · c908e3f7
      Matt Arsenault authored
      llvm-svn: 324550
      c908e3f7
    • Justin Lebar's avatar
      321b443e
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Fixed wait count reuse · db39b4b0
      Stanislav Mekhanoshin authored
      The code reusing existing wait counts is incorrect since it keeps
      adding new operands to an old instruction instead of replacing
      the immediate. It was also effectively switched off by the condition
      that wait count is not an AMDGPU::S_WAITCNT.
      
      Also switched to BuildMI instead of creating instructions directly.
      
      Differential Revision: https://reviews.llvm.org/D42997
      
      llvm-svn: 324547
      db39b4b0
    • Chandler Carruth's avatar
      [x86] Fix nasty bug in the x86 backend that is essentially impossible to · 0be0cfa6
      Chandler Carruth authored
      hit from IR but creates a minefield for MI passes.
      
      The x86 backend has fairly powerful logic to try and fold loads that
      feed register operands to instructions into a memory operand on the
      instruction. This is almost always a good thing, but there are specific
      relocated loads that are only allowed to appear in specific
      instructions. Notably, R_X86_64_GOTTPOFF is only allowed in `movq` and
      `addq`. This patch blocks folding of memory operands using this
      relocation unless the target is in fact `addq`.
      
      The particular relocation indicates why we simply don't hit this under
      normal circumstances. This relocation is only used for TLS, and it gets
      used in very specific ways in conjunction with %fs-relative addressing.
      The result is that loads using this relocation are essentially never
      eligible for folding into an instruction's memory operands. Unless, of
      course, you have an MI pass that inserts usage of such a load. I have
      exactly such an MI pass and was greeted by truly mysterious miscompiles
      where the linker replaced my instruction with a completely garbage byte
      sequence. Go team.
      
      This is the only such relocation I'm aware of in x86, but there may be
      others that need to be similarly restricted.
      
      Fixes PR36165.
      
      Differential Revision: https://reviews.llvm.org/D42732
      
      llvm-svn: 324546
      0be0cfa6
    • Mircea Trofin's avatar
      Verify profile data confirms large loop trip counts. · 06ac8cfb
      Mircea Trofin authored
      Summary:
      Loops with inequality comparers, such as:
      
         // unsigned bound
         for (unsigned i = 1; i < bound; ++i) {...}
      
      have getSmallConstantMaxTripCount report a large maximum static
      trip count - in this case, 0xffff fffe. However, profiling info
      may show that the trip count is much smaller, and thus
      counter-recommend vectorization.
      
      This change:
      - flips loop-vectorize-with-block-frequency on by default.
      - validates profiled loop frequency data supports vectorization,
        when static info appears to not counter-recommend it. Absence
        of profile data means we rely on static data, just as we've
        done so far.
      
      Reviewers: twoh, mkuper, davidxl, tejohnson, Ayal
      
      Reviewed By: davidxl
      
      Subscribers: bkramer, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D42946
      
      llvm-svn: 324543
      06ac8cfb
  2. Feb 07, 2018
Loading