Skip to content
  1. Dec 28, 2017
    • Simon Pilgrim's avatar
      [InstCombine] Check for isa<Instruction> before using cast<> · 472689a1
      Simon Pilgrim authored
      Protects against casts from constexpr etc.
      
      Reduced from oss-fuzz #4788 test case
      
      llvm-svn: 321515
      472689a1
    • Aaron Smith's avatar
      Remove duplicate declaration from D41550; NFC · 5a81bb73
      Aaron Smith authored
      llvm-svn: 321514
      5a81bb73
    • Rui Ueyama's avatar
      Do not parse the same /export string more than once. · a63eed0f
      Rui Ueyama authored
      Differential Revision: https://reviews.llvm.org/D41607
      
      llvm-svn: 321513
      a63eed0f
    • Bob Haarman's avatar
      [COFF] support /ignore:4217 · e90ac016
      Bob Haarman authored
      Summary:
      lld-link accepts link.exe's /ignore option, but used to ignore
      it. This can lead to semantic differences when warnings are treated as
      fatal errors. One such case is when we resolve an __imp_ symbol to a
      local definition. We emit a warning in that case, which /wx turns into
      a fatal. This change makes lld-link accept /ignore:4217 to suppress
      that warning, so that code that links with link.exe /wx /ignore:4217
      links with lld-link, too.
      
      Fixes PR35762.
      
      Reviewers: rnk, ruiu
      
      Reviewed By: ruiu
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D41606
      
      llvm-svn: 321512
      e90ac016
    • Aaron Smith's avatar
      Update failing PDB unit tests that are searching for symbols by regex · 364cbfe9
      Aaron Smith authored
      Summary: D41086 fixed an exception in FindTypes()/FindTypesByRegex() and caused two lldb unit test to fail. This change updates the unit tests to pass again.
      
      Reviewers: zturner, lldb-commits, labath, clayborg, asmith
      
      Reviewed By: asmith
      
      Differential Revision: https://reviews.llvm.org/D41550
      
      llvm-svn: 321511
      364cbfe9
    • Reid Kleckner's avatar
      Revert "[memcpyopt] Teach memcpyopt to optimize across basic blocks" · 6d31001c
      Reid Kleckner authored
      This reverts r321138. It seems there are still underlying issues with
      memdep. PR35519 seems to still be present if debug info is enabled. We
      end up losing a memcpy. Somehow during store to memset merging, we
      insert the memset after the memcpy or fail to update the memdep analysis
      to account for the newly inserted memset of a pair.
      
      Reduced test case:
      
        #include <assert.h>
        #include <stdio.h>
        #include <string>
        #include <utility>
        #include <vector>
      
        void do_push_back(
            std::vector<std::pair<std::string, std::vector<std::string>>>* crls) {
          crls->push_back(std::make_pair(std::string(), std::vector<std::string>()));
        }
      
        int __attribute__((optnone)) main() {
          // Put some data in the vector and then remove it so we take the push_back
          // fast path.
          std::vector<std::pair<std::string, std::vector<std::string>>> crl_set;
          crl_set.push_back({"asdf", {}});
          crl_set.pop_back();
          printf("first word in vector storage: %p\n", *(void**)crl_set.data());
      
          // Do the push_back which may fail to initialize the data.
          do_push_back(&crl_set);
          auto* first = &crl_set.back().first;
          printf("first word in vector storage (should be zero): %p\n",
                 *(void**)crl_set.data());
          assert(first->empty());
          puts("ok");
        }
      
      Compile with libc++, enable optimizations, and enable debug info:
      $ clang++ -stdlib=libc++ -g -O2 t.cpp -o t.exe -Wl,-rpath=llvm/build/lib
      
      This program will assert with this change.
      
      llvm-svn: 321510
      6d31001c
    • Andrew Wilkins's avatar
      [bindings/go] fix vet errors · 4371e049
      Andrew Wilkins authored
      Fix "go vet" errors, which will be
      run automatically with "go test" as
      of Go 1.10.
      
      Patch by Karsten Weiss!
      
      llvm-svn: 321509
      4371e049
    • Matt Arsenault's avatar
      AMDGPU: Add MMO to atomic_inc/dec · 27ee60ca
      Matt Arsenault authored
      This doesn't really change anything because these
      already had custom node wrappers.
      
      llvm-svn: 321508
      27ee60ca
    • Rafael Espindola's avatar
      Allow copy relocation with -z notext. · 465e7c94
      Rafael Espindola authored
      This makes adjustExpr a bit simpler too IMHO.
      
      It seems that some of the complication around relocation processing
      is that we are trying to create copy relocations too early. It seems
      we could handle a few simple cases first and continue.
      
      llvm-svn: 321507
      465e7c94
  2. Dec 27, 2017
    • Craig Topper's avatar
      [X86] Don't accidentally enable PKU on cannon lake and icelake or CLWB on cannonlake. · 520d055f
      Craig Topper authored
      We have cannonlake and icelake inheriting from skylake server in a switch using fallthroughs. But they aren't perfect supersets of skylake server.
      
      llvm-svn: 321504
      520d055f
    • Craig Topper's avatar
      [X86] Test that -march=skx enables PKU. · 5bd93e99
      Craig Topper authored
      llvm-svn: 321503
      5bd93e99
    • Craig Topper's avatar
      [X86] Enable avx512vpopcntdq and clwb for icelake. · b36447d3
      Craig Topper authored
      Per table 1-1 of the October 2017 edition of Intel® Architecture Instruction Set Extensions and Future Features Programming Reference
      
      llvm-svn: 321502
      b36447d3
    • Craig Topper's avatar
      [X86] Add CLWB to icelake. · 55cfa89f
      Craig Topper authored
      Per Table 1-1 in October 2017 edition of Intel® Architecture Instruction Set Extensions and Future Features
      
      llvm-svn: 321501
      55cfa89f
    • Sanjay Patel's avatar
      [InstCombine] add tests for min/max folds (PR35717); NFC · 84d54c3d
      Sanjay Patel authored
      llvm-svn: 321500
      84d54c3d
    • Rafael Espindola's avatar
      Don't try to preempt protected symbols with -z notext. · e2e070c6
      Rafael Espindola authored
      I will send a followup patch removing the FIXME this patch adds.
      
      llvm-svn: 321499
      e2e070c6
    • Petr Hosek's avatar
      [llvm-readobj] Support -needed-libs option for COFF files · ad6f457c
      Petr Hosek authored
      This implements the -needed-libs option in the COFF dumper.
      
      Differential Revision: https://reviews.llvm.org/D41529
      
      llvm-svn: 321498
      ad6f457c
    • Andrew V. Tischenko's avatar
      A special test to demonstrate debug logging for asm matcher. · 428e302f
      Andrew V. Tischenko authored
      llvm-svn: 321497
      428e302f
    • Craig Topper's avatar
      [X86] Reimplement r321437 using custom lowering instead of as a DAG combine. · 72bbbeb2
      Craig Topper authored
      My original implementation ran as a DAG combine post type legalization, but it turns out we don't run that DAG combine step if type legalization didn't change anything. Attempts to make the combine run before type legalization as well hit other issues.
      
      So just do it in LowerMUL where we can catch more cases.
      
      llvm-svn: 321496
      72bbbeb2
    • Alexey Bataev's avatar
      [OPENMP] Support for `depend` clauses on `target enter|exit data`. · fab20e4e
      Alexey Bataev authored
      Added codegen for `depend` clauses on `target enter|exit data` directives.
      
      llvm-svn: 321495
      fab20e4e
    • Hamza Sood's avatar
      [NFC] Small const correctness fix · d79c4403
      Hamza Sood authored
      llvm-svn: 321494
      d79c4403
    • Alexey Bataev's avatar
      [OPENMP] Support for `depend` clauses on `target data update`. · d2202cae
      Alexey Bataev authored
      Added codegen for `depend` clauses on `target data update` directives.
      
      llvm-svn: 321493
      d2202cae
    • Aleksei Sidorin's avatar
      [ASTImporter] Support importing FunctionTemplateDecl and CXXDependentScopeMemberExpr · 7f758b6a
      Aleksei Sidorin authored
      * Also introduces ImportTemplateArgumentListInfo facility (A. Sidorin)
      
      This re-commits r320942 after fixing the behaviour on '-fdelayed-template-parsing'
      option and adding additional checks.
      
      Patch by Peter Szecsi!
      
      Differential Revision: https://reviews.llvm.org/D38692
      
      llvm-svn: 321492
      7f758b6a
    • Matthew Simpson's avatar
      [AArch64] Change order of candidate FMLS patterns · 9439f549
      Matthew Simpson authored
      r319980 added new patterns to the machine combiner for transforming (fsub (fmul
      x y) z) into (fmla (fneg z) x y). That is, fsub's where the first source
      operand is an fmul are transformed. We previously only matched the case where
      the second source operand of an fsub was an fmul, transforming (fsub z (fmul x
      y)) into (fmls z x y). Now, if we have an fsub where both source operands are
      fmuls, both of the above patterns are applicable.
      
      However, the order in which we add the patterns to the list of candidates
      determines the transformation that takes place, since only the first pattern
      that matches will be used. This patch changes the order these two patterns are
      added to the list of candidates such that we prefer the case where the second
      source operand is an fmul (the fmls case), rather than the other one (the
      fmla/fneg case). When both source operands are fmuls, this ordering results in
      fewer instructions.
      
      Differential Revision: https://reviews.llvm.org/D41587
      
      llvm-svn: 321491
      9439f549
    • Benjamin Kramer's avatar
      [X86] Fix vmul combine for AVX1 targets. · 293f3430
      Benjamin Kramer authored
      v8i32 is legal von AVX1, but it doesn't have pmuludq for it.
      
      llvm-svn: 321490
      293f3430
    • Simon Pilgrim's avatar
      [InstCombine] Gracefully handle out of range extractelement indices · e7d032f1
      Simon Pilgrim authored
      InstSimplify is responsible for handling these, but we shouldn't just assert here.
      
      Reduced from oss-fuzz #4808 test case
      
      llvm-svn: 321489
      e7d032f1
    • Simon Pilgrim's avatar
      [DAGCombine] foldBinOpIntoSelect can fail to constant fold in some cases. · 6fad3cbc
      Simon Pilgrim authored
      For example, float operations may fail to constant fold under certain circumstances (inf/nan/denormal creation etc.)
      
      Reduced from oss-fuzz #4802 test case
      
      llvm-svn: 321488
      6fad3cbc
    • Coby Tayree's avatar
      [x86][icelake][vbmi2] · a09663a5
      Coby Tayree authored
      added vbmi2 feature recognition
      added intrinsics support for vbmi2 instructions
      _mm[128,256,512]_mask[z]_compress_epi[16,32]
      _mm[128,256,512]_mask_compressstoreu_epi[16,32]
      _mm[128,256,512]_mask[z]_expand_epi[16,32]
      _mm[128,256,512]_mask[z]_expandloadu_epi[16,32]
      _mm[128,256,512]_mask[z]_sh[l,r]di_epi[16,32,64]
      _mm[128,256,512]_mask_sh[l,r]dv_epi[16,32,64]
      matching a similar work on the backend (D40206)
      Differential Revision: https://reviews.llvm.org/D41557
      
      llvm-svn: 321487
      a09663a5
    • Jonas Hahnfeld's avatar
      [OpenMP] Further adjustments of nvptx runtime functions · fa059ba5
      Jonas Hahnfeld authored
      Pass in default value of 1, similar to previous commit r318836.
      
      Differential Revision: https://reviews.llvm.org/D41012
      
      llvm-svn: 321486
      fa059ba5
    • Jonas Hahnfeld's avatar
      [XRay] Add missing include to unit test · 4452100a
      Jonas Hahnfeld authored
      FDRLoggingTest::MultiThreadedCycling uses std::array so we need to
      include the right C++ header and not rely on transitive dependencies.
      
      llvm-svn: 321485
      4452100a
    • Coby Tayree's avatar
      [x86][icelake][vnni] · 3d9c88cf
      Coby Tayree authored
      added vnni feature recognition
      added intrinsics support for VNNI instructions
      _mm256_mask_dpbusd_epi32
      _mm256_maskz_dpbusd_epi32
      _mm256_dpbusd_epi32
      _mm256_mask_dpbusds_epi32
      _mm256_maskz_dpbusds_epi32
      _mm256_dpbusds_epi32
      _mm256_mask_dpwssd_epi32
      _mm256_maskz_dpwssd_epi32
      _mm256_dpwssd_epi32
      _mm256_mask_dpwssds_epi32
      _mm256_maskz_dpwssds_epi32
      _mm256_dpwssds_epi32
      _mm128_mask_dpbusd_epi32
      _mm128_maskz_dpbusd_epi32
      _mm128_dpbusd_epi32
      _mm128_mask_dpbusds_epi32
      _mm128_maskz_dpbusds_epi32
      _mm128_dpbusds_epi32
      _mm128_mask_dpwssd_epi32
      _mm128_maskz_dpwssd_epi32
      _mm128_dpwssd_epi32
      _mm128_mask_dpwssds_epi32
      _mm128_maskz_dpwssds_epi32
      _mm128_dpwssds_epi32
      _mm512_mask_dpbusd_epi32
      _mm512_maskz_dpbusd_epi32
      _mm512_dpbusd_epi32
      _mm512_mask_dpbusds_epi32
      _mm512_maskz_dpbusds_epi32
      _mm512_dpbusds_epi32
      _mm512_mask_dpwssd_epi32
      _mm512_maskz_dpwssd_epi32
      _mm512_dpwssd_epi32
      _mm512_mask_dpwssds_epi32
      _mm512_maskz_dpwssds_epi32
      _mm512_dpwssds_epi32
      matching a similar work on the backend (D40208)
      Differential Revision: https://reviews.llvm.org/D41558
      
      llvm-svn: 321484
      3d9c88cf
    • Coby Tayree's avatar
      [x86][icelake][bitalg] · 2268576f
      Coby Tayree authored
      added bitalg feature recognition
      added intrinsics support for bitalg instructions
      _mm512_popcnt_epi16
      _mm512_mask_popcnt_epi16
      _mm512_maskz_popcnt_epi16
      _mm512_popcnt_epi8
      _mm512_mask_popcnt_epi8
      _mm512_maskz_popcnt_epi8
      _mm512_mask_bitshuffle_epi64_mask
      _mm512_bitshuffle_epi64_mask
      _mm256_popcnt_epi16
      _mm256_mask_popcnt_epi16
      _mm256_maskz_popcnt_epi16
      _mm128_popcnt_epi16
      _mm128_mask_popcnt_epi16
      _mm128_maskz_popcnt_epi16
      _mm256_popcnt_epi8
      _mm256_mask_popcnt_epi8
      _mm256_maskz_popcnt_epi8
      _mm128_popcnt_epi8
      _mm128_mask_popcnt_epi8
      _mm128_maskz_popcnt_epi8
      _mm256_mask_bitshuffle_epi32_mask
      _mm256_bitshuffle_epi32_mask
      _mm128_mask_bitshuffle_epi16_mask
      _mm128_bitshuffle_epi16_mask
      matching a similar work on the backend (D40222)
      Differential Revision: https://reviews.llvm.org/D41564
      
      llvm-svn: 321483
      2268576f
    • Coby Tayree's avatar
      [hotfix] · f72630bb
      Coby Tayree authored
      fixinig test failures as seen here:
      http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/22791/steps/test/logs/stdio
      which resulted by rL321480
      
      llvm-svn: 321482
      f72630bb
    • Jonas Hahnfeld's avatar
      Unify build documentation and convert to reStructuredText · 2e809acd
      Jonas Hahnfeld authored
      We now have several options that apply for both libraries and they
      shouldn't be documented in multiple files. When already merging
      the two Build_With_CMake.txt documents, convert them to
      reStructuredText which is used for all of LLVM's documentation.
      
      Differential Revision: https://reviews.llvm.org/D40920
      
      llvm-svn: 321481
      2e809acd
    • Coby Tayree's avatar
      [x86][icelake][vpclmulqdq] · cf96c876
      Coby Tayree authored
      added vpclmulqdq feature recognition
      added intrinsics support for vpclmulqdq instructions
        _mm256_clmulepi64_epi128
        _mm512_clmulepi64_epi128
      matching a similar work on the backend (D40101)
      Differential Revision: https://reviews.llvm.org/D41573
      
      llvm-svn: 321480
      cf96c876
    • Rui Ueyama's avatar
      Improve performance TokenizeWindowsCommandLine · 6ec880d9
      Rui Ueyama authored
      Patcy by Takuto Ikuta.
      
      This patch reduces lld link time of chromium's blink_core.dll in
      component build.
      
      Total size of input argument in .directives become nearly 300MB in the
      build and calling many strchr and assert becomes bottleneck.
      
      On my desktop machine, 4 times stats of the link time are like below.
      Improved around 10%.
      
      This patch
      TotalSeconds : 13.4918885
      TotalSeconds : 13.9474257
      TotalSeconds : 13.4941082
      TotalSeconds : 13.60779621
      Avg : 13.63530465
      
      master
      TotalSeconds : 15.6938531
      TotalSeconds : 15.7022508
      TotalSeconds : 15.9567202
      TotalSeconds : 14.5851505
      Avg : 15.48449365
      
      Differential Revision: https://reviews.llvm.org/D41590
      
      llvm-svn: 321479
      6ec880d9
    • Mikael Holmen's avatar
      [Lint] Don't warn about noalias argument aliasing if other argument is byval · fb2fd20f
      Mikael Holmen authored
      Summary:
      When using byval, the data is effectively copied as part of the call
      anyway, so we aren't actually passing the pointer and thus there is no
      reason to issue a warning.
      
      Reviewers: rnk
      
      Reviewed By: rnk
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D40118
      
      llvm-svn: 321478
      fb2fd20f
    • Coby Tayree's avatar
      [x86][icelake][gfni] · f4811ebc
      Coby Tayree authored
      added gfni feature recognition
      added intrinsics support for gfni instructions
        _mm_gf2p8affineinv_epi64_epi8
        _mm_mask_gf2p8affineinv_epi64_epi8
        _mm_maskz_gf2p8affineinv_epi64_epi8
        _mm256_gf2p8affineinv_epi64_epi8
        _mm256_mask_gf2p8affineinv_epi64_epi8
        _mm256_maskz_gf2p8affineinv_epi64_epi8
        _mm512_gf2p8affineinv_epi64_epi8
        _mm512_mask_gf2p8affineinv_epi64_epi8
        _mm512_maskz_gf2p8affineinv_epi64_epi8
        _mm_gf2p8affine_epi64_epi8
        _mm_mask_gf2p8affine_epi64_epi8
        _mm_maskz_gf2p8affine_epi64_epi8
        _mm256_gf2p8affine_epi64_epi8
        _mm256_mask_gf2p8affine_epi64_epi8
        _mm256_maskz_gf2p8affine_epi64_epi8
        _mm512_gf2p8affine_epi64_epi8
        _mm512_mask_gf2p8affine_epi64_epi8
        _mm512_maskz_gf2p8affine_epi64_epi8
        _mm_gf2p8mul_epi8
        _mm_mask_gf2p8mul_epi8
        _mm_maskz_gf2p8mul_epi8
        _mm256_gf2p8mul_epi8
        _mm256_mask_gf2p8mul_epi8
        _mm256_maskz_gf2p8mul_epi8
        _mm512_gf2p8mul_epi8
        _mm512_mask_gf2p8mul_epi8
        _mm512_maskz_gf2p8mul_epi8
      matching a similar work on the backend (D40373)
      Differential Revision: https://reviews.llvm.org/D41582
      
      llvm-svn: 321477
      f4811ebc
    • Gadi Haber's avatar
      [X86][RD]: Adding full coverage of MC encoding for RD isa sets.<NFC> · 309b06cb
      Gadi Haber authored
      NFC.
      Adding MC regressions tests to cover RDPMC, RDRAND, RDRAND, RDSEED, RDTSCP, DWRFSGS isa sets.
      This patch is part of a larger task to cover MC encoding of all X86 isa sets started in revision: https://reviews.llvm.org/D39952
      
      Reviewers: zvi, craig.topper, RKSimon, AndreiGrischenk
      Differential Revision: https://reviews.llvm.org/D41328
      
      Change-Id: Ie97b397546e6b1ed180c6abd7b41fccb136d2b82
      llvm-svn: 321476
      309b06cb
    • Serguei Katkov's avatar
      [SCEV] Be careful with nuw/nsw/exact in InsertBinop · da56a7f3
      Serguei Katkov authored
      InsertBinop tries to find an appropriate instruction instead of
      creating a new instruction. When it checks whether instruction is
      the same as we need to create it ignores nuw/nsw/exact flags.
      
      It leads to invalid behavior when poison instruction can be used
      when it was not expected. Specifically, for example Expander
      expands the SCEV built for instruction
      %a = add i32 %v, 1
      It is possible that InsertBinop can find an instruction
      % b = add nuw nsw i32 %v, 1
      and will use it instead of version w/o nuw nsw.
      It is incorrect.
      
      The patch conservatively ignores all instructions with any of
      poison flags installed.
      
      Reviewers: sanjoy, mkazantsev, sebpop, jbhateja
      Reviewed By: sanjoy
      Subscribers: llvm-commits
      Differential Revision: https://reviews.llvm.org/D41576
      
      llvm-svn: 321475
      da56a7f3
    • Coby Tayree's avatar
      [x86][icelake][vaes] · a1e5f0c3
      Coby Tayree authored
      added vaes feature recognition
      added intrinsics support for vaes instructions, matching a similar work on the backend (D40078)
        _mm256_aesenc_epi128
        _mm512_aesenc_epi128
        _mm256_aesenclast_epi128
        _mm512_aesenclast_epi128
        _mm256_aesdec_epi128
        _mm512_aesdec_epi128
        _mm256_aesdeclast_epi128
        _mm512_aesdeclast_epi128
      
      llvm-svn: 321474
      a1e5f0c3
Loading