1. Jul 29, 2019
    • Francis Visoiu Mistrih's avatar
      [RISCV] Fix uninitialized variable after call to evaluateConstantImm · d42289e2
      Francis Visoiu Mistrih authored
      For llvm/test/MC/RISCV/rv64i-aliases-invalid.s, UBSan reports:
      
      lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:371:9: runtime error:
      load of value 3879186881, which is not a valid value for type
      'RISCVMCExpr::VariantKind'
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
      lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:371:9 in
      
      It turns out that evaluateConstantImm does not set `VK` and it remains
      unitialized when doing comparisons in `isImmXLenLI()`.
      
      Differential Revision: https://reviews.llvm.org/D65347
      
      llvm-svn: 367230
      d42289e2
    • Sven van Haastregt's avatar
      [OpenCL] Rename builtin definition classes · 89fb9e8c
      Sven van Haastregt authored
      Factor out some of the renames from D63434 and D63442, and generate
      half type convert_ builtins.
      
      Patch by Pierre Gondois and Sven van Haastregt.
      
      llvm-svn: 367229
      89fb9e8c
    • Michal Gorny's avatar
      [lldb] [test] Mark three new tests XFAIL on NetBSD · e0ab4c8e
      Michal Gorny authored
      llvm-svn: 367228
      e0ab4c8e
    • Sanjay Patel's avatar
      [InstCombine] fold fadd+fneg with fdiv/fmul betweena · e9ee7b47
      Sanjay Patel authored
      The backend already does this via isNegatibleForFree(),
      but we may want to alter the fneg IR canonicalizations
      that currently exist, so we need to try harder to fold
      fneg in IR to avoid regressions.
      
      llvm-svn: 367227
      e9ee7b47
    • Hideto Ueno's avatar
      [ValueTracking] Remove volatile check in isGuaranteedToTransferExecutionToSuccessor · 98d281a9
      Hideto Ueno authored
      Summary: As clarified in D53184, volatile load and store do not trap. Therefore, we should remove volatile checks for instructions in  `isGuaranteedToTransferExecutionToSuccessor`.
      
      Reviewers: jdoerfert, efriedma, nikic
      
      Reviewed By: nikic
      
      Subscribers: hiraditya, jfb, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D65375
      
      llvm-svn: 367226
      98d281a9
    • Nico Weber's avatar
      clang-format clang/lib/Format · ff9f4b54
      Nico Weber authored
      llvm-svn: 367225
      ff9f4b54
    • Sanjay Patel's avatar
      [InstCombine] reduce code for fadd with fneg operand; NFC · 5483f422
      Sanjay Patel authored
      llvm-svn: 367224
      5483f422
    • Sanjay Patel's avatar
      [InstCombine] add tests for fadd with negated operand; NFC · 74c35bd6
      Sanjay Patel authored
      llvm-svn: 367222
      74c35bd6
    • Jay Foad's avatar
      [AMDGPU] Add amdgpu_kernel for consistency with other tests · 2bd9da8a
      Jay Foad authored
      llvm-svn: 367221
      2bd9da8a
    • Simon Pilgrim's avatar
      [DAGCombine] narrowInsertExtractVectorBinOp - early out for binops that change value type. NFCI. · f8a7e9de
      Simon Pilgrim authored
      This is implicit in the value type checks in getSubVectorSrc - this just makes it upfront and obvious.
      
      llvm-svn: 367220
      f8a7e9de
    • Rafael Stahl's avatar
      doc: Fix Google C++ Style Guide link. · 0e074fa0
      Rafael Stahl authored
      llvm-svn: 367219
      0e074fa0
    • Jay Foad's avatar
      [DivergenceAnalysis] Add methods for querying divergence at use · dcb75324
      Jay Foad authored
      Summary:
      The existing isDivergent(Value) methods query whether a value is
      divergent at its definition. However even if a value is uniform at its
      definition, a use of it in another basic block can be divergent because
      of divergent control flow between the def and the use.
      
      This patch adds new isDivergent(Use) methods to DivergenceAnalysis,
      LegacyDivergenceAnalysis and GPUDivergenceAnalysis.
      
      This might allow D63953 or other similar workarounds to be removed.
      
      Reviewers: alex-t, nhaehnle, arsenm, rtaylor, rampitec, simoll, jingyue
      
      Reviewed By: nhaehnle
      
      Subscribers: jfb, jvesely, wdng, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D65141
      
      llvm-svn: 367218
      dcb75324
    • Simon Pilgrim's avatar
      [SystemZ] Regenerate <8 x i31> store test · a4f08dde
      Simon Pilgrim authored
      To help show the diffs from an upcoming SimplifyDemandedBits patch.
      
      llvm-svn: 367216
      a4f08dde
    • Hans Wennborg's avatar
      Mark test/MC/RISCV/rv{32,64}i-aliases-invalid.s unsupported also on Windows · ecd137c7
      Hans Wennborg authored
      Because they fail there too.
      
      FAIL: LLVM :: MC/RISCV/rv32i-aliases-invalid.s (24397 of 32659)
      ******************** TEST 'LLVM :: MC/RISCV/rv32i-aliases-invalid.s' FAILED ********************
      Script:
      --
      : 'RUN: at line 2';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s -triple=riscv32 -riscv-no-aliases 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s
      : 'RUN: at line 3';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s -triple=riscv32 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s
      --
      Exit Code: 1
      
      Command Output (stdout):
      --
      $ ":" "RUN: at line 2"
      $ "not" "c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s" "-triple=riscv32" "-riscv-no-aliases"
      $ "c:\src\llvm.monorepo\build.release2\bin\filecheck.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s"
      C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv32i-aliases-invalid.s:10:21: error: CHECK: expected string not found in input
      li t4, foo # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-2147483648, 4294967295]
                          ^
      <stdin>:5:1: note: scanning from here
      li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-2147483648, 4294967295]
      ^
      <stdin>:5:1: note: with "@LINE" equal to "10"
      li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-2147483648, 4294967295]
      ^
      <stdin>:5:38: note: possible intended match here
      li x0, -2147483649 # CHECK: :[[@LINE]]:8: error: immediate must be an integer in the range [-2147483648, 4294967295]
                                           ^
      
      error: command failed with exit status: 1
      
      --
      
      --
      ********************
      Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70
      FAIL: LLVM :: MC/RISCV/rv64i-aliases-invalid.s (24416 of 32659)
      ******************** TEST 'LLVM :: MC/RISCV/rv64i-aliases-invalid.s' FAILED ********************
      Script:
      --
      : 'RUN: at line 2';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s -triple=riscv64 -riscv-no-aliases 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s
      : 'RUN: at line 3';   not c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s -triple=riscv64 2>&1 | c:\src\llvm.monorepo\build.release2\bin\filecheck.exe C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s
      --
      Exit Code: 1
      
      Command Output (stdout):
      --
      $ ":" "RUN: at line 2"
      $ "not" "c:\src\llvm.monorepo\build.release2\bin\llvm-mc.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s" "-triple=riscv64" "-riscv-no-aliases"
      $ "c:\src\llvm.monorepo\build.release2\bin\filecheck.exe" "C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s"
      C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s:6:21: error: CHECK: expected string not found in input
      li t4, foo # CHECK: :[[@LINE]]:8: error: operand must be a constant 64-bit integer
                          ^
      <stdin>:2:1: note: scanning from here
      li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
      ^
      <stdin>:2:1: note: with "@LINE" equal to "6"
      li t5, 0x10000000000000000 # CHECK: :[[@LINE]]:8: error: unknown operand
      ^
      <stdin>:13:67: note: possible intended match here
      C:\src\llvm.monorepo\llvm\test\MC\RISCV\rv64i-aliases-invalid.s:12:13: error: immediate must be an integer in the range [0, 63]
                                                                        ^
      
      error: command failed with exit status: 1
      llvm-svn: 367215
      ecd137c7
    • Simon Pilgrim's avatar
      [ARM] Regenerate rotation tests · adda256a
      Simon Pilgrim authored
      llvm-svn: 367214
      adda256a
    • Simon Pilgrim's avatar
      [AMDGPU] Regenerate v2i16 insertelement tests. · 251b546f
      Simon Pilgrim authored
      To help show the diffs from an upcoming SimplifyDemandedBits patch.
      
      llvm-svn: 367213
      251b546f
    • Sam Parker's avatar
      [NFC][ARM[ParallelDSP] Cleanup of BinOpChain · 414dd1c9
      Sam Parker authored
      - Remove some unused typedefs.
      - Rename BinOpChain struct to MulCandidate.
      - Remove the size method of MulCandidate.
      - Store only the first input of the ValueList provided to
        MulCandidate, as it's the only value we care about. This means we
        don't have to perform any ugly (and unnecessary) iterations of the 
        list later on.
      
      llvm-svn: 367208
      414dd1c9
    • Raphael Isemann's avatar
      [lldb][NFC] Split emitting and parsing in LLDBOptionDefEmitter · 4e44c77a
      Raphael Isemann authored
      Splitting the different logic is cleaner and we it will be easier
      to implement the enum emitting (which otherwise would have to
      reimplement the Record parsing).
      
      llvm-svn: 367207
      4e44c77a
    • David Stuttard's avatar
      [AMDGPU] Enable v4f16 and above for v_pk_fma instructions · 20235ef3
      David Stuttard authored
      Summary:
      If isel is presented with <2 x half> vectors then it will correctly select
      v_pk_fma style instructions.
      If isel is presented with e.g. <4 x half> vectors it will scalarize, unlike for
      other instruction types (such as fadd, fmul etc.)
      
      Added extra support to enable this. Updated one of the tests to include a test
      for this (as well as extending the test to GFX9)
      
      Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D65325
      
      Change-Id: I50a4577a3f8223fb53992af3b7d26121f65b71ee
      llvm-svn: 367206
      20235ef3
    • Sam Parker's avatar
      [NFC][ARM][ParallelDSP] Remove AreSymmetrical · 85380601
      Sam Parker authored
      We explicitly search for a parallel mac and we only care about its
      inputs, checking for symmetry doesn't add anything here.
      
      llvm-svn: 367205
      85380601
    • Sam Parker's avatar
      [NFC][ARM][ParallelDSP] Remove PopulateLoads · 11ad33ed
      Sam Parker authored
      We no longer have to check what loads are used, all this
      is performed at the start of the transform, so it's not
      doing anything now.
      
      llvm-svn: 367204
      11ad33ed
    • George Rimar's avatar
      [obj2yaml] - Report a error when unable to resolve a sh_link reference properly. · aef03e86
      George Rimar authored
      Because of a bug we did not report a error in the case
      shown in the test. With this patch we do.
      
      Differential revision: https://reviews.llvm.org/D65214
      
      llvm-svn: 367203
      aef03e86
    • George Rimar's avatar
      [llvm-objcopy] - Reimplement strip-dwo-groups.test to stop using the precompiled object. · 99f73ebe
      George Rimar authored
      When llvm-copy removes .dwo sections the index of symbol table,
      the indices of the symbols and the indices of the sections which go
      after the removed ones changes. That affects on SHT_GROUP sections,
      which needs to be updated.
      
      Initially this test used a precompiled object, I rewrote it to use YAML
      and improved a bit.
      
      Differential revision: https://reviews.llvm.org/D65273
      
      llvm-svn: 367202
      99f73ebe
    • Raphael Isemann's avatar
      [lldb][NFC] Remove DiagnosticManager::CopyDiagnostics · 822c5870
      Raphael Isemann authored
      The Diagnostic class in LLDB is suppossed to be inherited from,
      so just copying the diagnostics like this is wrong. The function
      is also unused, so lets just get rid of it instead of creating
      some cloning facility for it.
      
      llvm-svn: 367201
      822c5870
    • Rui Ueyama's avatar
      Return early. NFC. · d524c170
      Rui Ueyama authored
      llvm-svn: 367200
      d524c170
    • Mike Spertus's avatar
      Improve MSVC visualizers for DeclSpec and TemplateName · 9aeab53e
      Mike Spertus authored
      DeclSpec now shows the TypeRep, ExprRep, or DeclRep as appropriate
      TemplateName decodes and displays the StorageType
      A few minor refinements to other types
      
      llvm-svn: 367199
      9aeab53e
    • Craig Topper's avatar
      [X86] Don't use PMADDWD for vector add reductions of multiplies if the mul... · eb1beaba
      Craig Topper authored
      [X86] Don't use PMADDWD for vector add reductions of multiplies if the mul inputs have an additional user.
      
      The pmaddwd inserts a truncate, if that truncate would end up
      creating additional instructions instead of making a zext
      narrower, then we shouldn't do it.
      
      I've restricted this to only sse4.1 targets since on prior
      targets the zext will be done in stages. So the truncate will
      probably not create additional instructions. Might need some
      more investigation of mul shrinking and the other pmaddwd
      transform to be sure this is the right decision.
      
      There might be a slight regression on AVX1 targets due to add
      splitting. Hard to say for sure. Maybe we need to look into
      using the vector reduction flag to use 2 narrow loads and a
      blend instead of extracting and inserting.
      
      llvm-svn: 367198
      eb1beaba
    • Craig Topper's avatar
      ac9d0f41
    • Roman Lebedev's avatar
    • Craig Topper's avatar
      [X86] In combineLoopMAddPattern and combineLoopSADPattern, preserve the vector... · 894916ca
      Craig Topper authored
      [X86] In combineLoopMAddPattern and combineLoopSADPattern, preserve the vector reduction flag on the final add. Handle unrolled loops by letting DAG combine revisit.
      
      This reverts r340478 and r340631 and replaces them with a simpler
      method of just letting DAG combine revisit the nodes to handle
      the other operand.
      
      llvm-svn: 367195
      894916ca
    • Sanjay Patel's avatar
      [InstCombine] fold fsub+fneg with fdiv/fmul between · 99c57c6d
      Sanjay Patel authored
      The backend already does this via isNegatibleForFree(),
      but we may want to alter the fneg IR canonicalizations
      that currently exist, so we need to try harder to fold
      fneg in IR to avoid regressions.
      
      llvm-svn: 367194
      99c57c6d
  2. Jul 28, 2019