Skip to content
  1. Aug 11, 2018
  2. Aug 10, 2018
    • JF Bastien's avatar
      [NFC] More ConstantMerge refactoring · 62fb8ea4
      JF Bastien authored
      This makes my upcoming patch much easier to read.
      
      llvm-svn: 339478
      62fb8ea4
    • Sid Manning's avatar
      [ELF][HEXAGON] Add R_HEX_8_X relocation · 07e541a8
      Sid Manning authored
      Differential Revision: https://reviews.llvm.org/D50577
      
      llvm-svn: 339477
      07e541a8
    • George Karpenkov's avatar
      [analyzer] Fix tracking expressions through negation operator · b5dd3ccd
      George Karpenkov authored
      Differential Revision: https://reviews.llvm.org/D50537
      
      llvm-svn: 339476
      b5dd3ccd
    • George Karpenkov's avatar
      [analyzer] [NFC] [tests] Move plist-based diagnostics tests to separate files,... · 09a9e3ab
      George Karpenkov authored
      [analyzer] [NFC] [tests] Move plist-based diagnostics tests to separate files, use diff instead of a FileCheck
      
      Some of the analyzer tests check the exact plist output, in order to
      verify that the diagnostics produced is correct.
      Current testing setup has many issues:
      
      plist output clobbers tests, making them harder to read
      it is impossible to debug test failures given error messages from FileCheck.
      The only recourse is manually creating the files and using the diff
      again, it is impossible to update the tests given the error message:
      the only process is a tedious manual one,
      going from a separate plist file to CHECK directives.
      
      This patch offers a much better approach of using "diff" directly in place of FileCheck,
      and moving tests to separate files.
      
      Generated using the following script:
      
      ```
      import os
      import glob
      import re
      import subprocess
      
      diagnostics_key = "// CHECK:  <key>diagnostics</key>"
      
      def process_file(f, data):
          idx = data.index(diagnostics_key)
          plist_out_f = 'ExpectedOutputs/plists/%s.plist' % f
          plist_out_folder = os.path.join('ExpectedOutputs/plists/', os.path.dirname(f))
          plist_data = data[idx:]
          plist_data = plist_data.replace('// CHECK: ', '')
          plist_data = plist_data.replace('// CHECK-NEXT: ', '')
          plist_data += "</dict>\n</plist>\n"
          data = data[:idx]
      
          ptn = re.compile("FileCheck --?input-file(=| )(%t|%t\.plist) %s")
      
          if not ptn.findall(data):
              print "none found =/ skipping..."
              return
      
          data = ptn.sub(lambda m: "tail -n +11 %s | diff -u -w - %%S/../%s" % (m.group(2), plist_out_f), data)
      
          with open(f, 'w') as out_f:
              out_f.write(data)
      
          subprocess.check_call(["mkdir", "-p", plist_out_folder])
          with open(plist_out_f, 'w') as out_f:
              out_f.write(plist_data)
      
      def main():
          files = glob.glob("**/*.*")
          for f in files:
              with open(f) as f_handler:
                  data = f_handler.read()
              if diagnostics_key in data:
                  print "Converting %s" %f
                  process_file(f, data)
      
      if __name__ == "__main__":
          main()
      ```
      
      Differential Revision: https://reviews.llvm.org/D50545
      
      llvm-svn: 339475
      09a9e3ab
    • Wouter van Oortmerssen's avatar
      [WebAssembly] Added default stack-only instruction mode for MC. · ab26bd06
      Wouter van Oortmerssen authored
      Summary:
      Moved Explicit Locals pass to last.
      Made that pass obligatory.
      Made it convert from register to stack based instructions, and removed the registers.
      Fixes to related code that was expecting register based instructions.
      Added the correct testing flag to all tests, depending on what the
      format they were expecting so far.
      Translated one test to stack format as example: reg-stackify-stack.ll
      
      tested:
      llvm-lit -v `find test -name WebAssembly`
      unittests/MC/*
      
      Reviewers: dschuff, sunfish
      
      Subscribers: jfb, llvm-commits, aheejin, eraman, jgravelle-google, sbc100
      
      Differential Revision: https://reviews.llvm.org/D50568
      
      llvm-svn: 339474
      ab26bd06
    • Raphael Isemann's avatar
      Remove copy-pasted and unrelated comment [NFC] · 4b2e0b6c
      Raphael Isemann authored
      That comment was copied from the
      CombineConsecutiveEntriesWithEqualData() implementation below,
      and doesn't actually describe what's happening in the current
      function.
      
      llvm-svn: 339473
      4b2e0b6c
    • Eli Friedman's avatar
      [ARM] Adjust AND immediates to make them cheaper to select. · e1687a89
      Eli Friedman authored
      LLVM normally prefers to minimize the number of bits set in an AND
      immediate, but that doesn't always match the available ARM instructions.
      In Thumb1 mode, prefer uxtb or uxth where possible; otherwise, prefer
      a two-instruction sequence movs+ands or movs+bics.
      
      Some potential improvements outlined in
      ARMTargetLowering::targetShrinkDemandedConstant, but seems to work
      pretty well already.
      
      The ARMISelDAGToDAG fix ensures we don't generate an invalid UBFX
      instruction due to a larger-than-expected mask. (It's orthogonal, in
      some sense, but as far as I can tell it's either impossible or nearly
      impossible to reproduce the bug without this change.)
      
      According to my testing, this seems to consistently improve codesize by
      a small amount by forming bic more often for ISD::AND with an immediate.
      
      Differential Revision: https://reviews.llvm.org/D50030
      
      llvm-svn: 339472
      e1687a89
    • Zachary Turner's avatar
      [MS Demangler] Support extern "C" functions. · 29ec67b6
      Zachary Turner authored
      There are two cases we need to support with extern "C"
      functions.  The first is the case of a '9' indicating that
      the function has no prototype.  This occurs when we mangle
      a symbol inside of an extern "C" function, but not the
      function itself.
      
      The second case is when we have an overloaded extern "C"
      functions.  In this case we emit $$J0 to indicate this.
      This patch adds support for both of these cases.
      
      llvm-svn: 339471
      29ec67b6
    • Sanjay Patel's avatar
      [InstCombine] add tests for fsub factorization; NFC · 0b62b011
      Sanjay Patel authored
      The tests show that;
      1. The fold doesn't fire for vectors, but it should.
      2. The fold fires regardless of uses, but it shouldn't.
      
      llvm-svn: 339470
      0b62b011
    • Sanjay Patel's avatar
      [InstCombine] rearrange code for foldSelectBinOpIdentity; NFCI · 85e17bb1
      Sanjay Patel authored
      This is a retry of rL339439 with a fix for the problem that
      caused the original commit to be reverted at rL339446. 
      
      That problem was that the compare can be integer while
      the binop is FP or vice-versa, so we need to use the binop 
      type when we ask for the identity constant.
      
      A test to guard against the problem was added at rL339453.
      
      llvm-svn: 339469
      85e17bb1
    • Matt Davis's avatar
      [llvm-mca] Make InstrBuilder::getOrCreateInstrDesc private. NFC. · 99a1ce97
      Matt Davis authored
      llvm-svn: 339468
      99a1ce97
    • Sanjay Patel's avatar
      3950095e
    • Zachary Turner's avatar
      Resubmit r339450 - [MS Demangler] Add conversion operator tests · 909b819c
      Zachary Turner authored
      This was broken because of a malformed check line.  Incidentally,
      this exposed a case where we crash when we should just be returning
      an error, so we should fix that.  The demangler shouldn't crash due
      to user input.
      
      llvm-svn: 339466
      909b819c
    • Zachary Turner's avatar
      [MS Demangler] Demangle cv qualifiers on template args. · 073620bc
      Zachary Turner authored
      Before we wouldn't properly demangle something like
      Foo<const int>.  Template args have a special escape sequence
      '$$C' that is optional, but if it is present contains
      qualifiers.  So we need to check for this and only if it
      present, demangle qualifiers before demangling the type.
      
      With this fix, we re-enable some tests that were previously
      marked FIXME.
      
      llvm-svn: 339465
      073620bc
    • Matt Arsenault's avatar
      AMDGPU: More canonicalized operations · 940e6075
      Matt Arsenault authored
      llvm-svn: 339464
      940e6075
    • Sanjay Patel's avatar
      revert r339450 - [MS Demangler] Add conversion operator tests · 8988b8d9
      Sanjay Patel authored
      Something here causes an assertion failure that killed a bunch of bots.
      Example:
      http://lab.llvm.org:8011/builders/reverse-iteration/builds/7021/steps/check_all/logs/stdio
      
      llvm-svn: 339463
      8988b8d9
    • Matt Arsenault's avatar
      AMDGPU: Combine and of seto/setuo and fp_class · 3dcf4ce4
      Matt Arsenault authored
      Clear the nan (or non-nan) test bits from the mask.
      
      llvm-svn: 339462
      3dcf4ce4
    • Matt Arsenault's avatar
      AMDGPU: Turn class x, p_zero|n_zero into fcmp oeq x, 0 · d35f46ca
      Matt Arsenault authored
      The library does use this for some reason.
      
      llvm-svn: 339461
      d35f46ca
Loading