1. Jun 27, 2017
  2. Jun 26, 2017
    • Tom Stellard's avatar
      AMDGPU/GlobalISel: Mark 32-bit G_SHL as legal · eb8f1e27
      Tom Stellard authored
      Reviewers: arsenm
      
      Reviewed By: arsenm
      
      Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D34589
      
      llvm-svn: 306298
      eb8f1e27
    • Marina Yatsina's avatar
      [inline asm][gcc-compatiblity] "=i" output constraint support · 33eb7752
      Marina Yatsina authored
      Ignore ‘i’,’n’,’E’,’F’ as output constraints in inline assembly (gcc compatibility)
      
      Differential Revision: https://reviews.llvm.org/D31383
      
      llvm-svn: 306297
      33eb7752
    • Simon Pilgrim's avatar
      [X86] Add test case for PR15981 · 0ad0e580
      Simon Pilgrim authored
      llvm-svn: 306296
      0ad0e580
    • Rui Ueyama's avatar
      Remove a stale comment. · fb02869b
      Rui Ueyama authored
      llvm-svn: 306295
      fb02869b
    • Simon Pilgrim's avatar
      e77df9bc
    • Reid Kleckner's avatar
      [COFF] Improve synthetic symbol handling · 502d4ce2
      Reid Kleckner authored
      Summary:
      The main change is that we can have SECREL and SECTION relocations
      against ___safe_se_handler_table, which is important for handling the
      debug info in the MSVCRT.
      
      Previously we were using DefinedRelative for __safe_se_handler_table and
      __ImageBase, and after we implement CFGuard, we plan to extend it to
      handle __guard_fids_table, __guard_longjmp_table, and more.  However,
      DefinedRelative is really only suitable for implementing __ImageBase,
      because it lacks a Chunk, which you need in order to figure out the
      output section index and output section offset when resolving SECREl and
      SECTION relocations.
      
      This change renames DefinedRelative to DefinedSynthetic and gives it a
      Chunk. One wart is that __ImageBase doesn't have a chunk. It points to
      the PE header, effectively. We could split DefinedRelative and
      DefinedSynthetic if we think that's cleaner and creates fewer special
      cases.
      
      I also added safeseh.s, which checks that we don't emit a safe seh table
      entries pointing to garbage collected handlers and that we don't emit a
      table at all when there are no handlers.
      
      Reviewers: ruiu
      
      Reviewed By: ruiu
      
      Subscribers: inglorion, pcc, llvm-commits, aprantl
      
      Differential Revision: https://reviews.llvm.org/D34577
      
      llvm-svn: 306293
      502d4ce2
    • Rui Ueyama's avatar
      Add GlobalOffsetTable to ElfSym. NFC. · 92c37819
      Rui Ueyama authored
      Most "reserved" symbols are in ElfSym and it looks like there's no
      reason to not do the same thing for _GLOBAL_OFFSET_TABLE_. This should
      help https://reviews.llvm.org/D34618 too.
      
      llvm-svn: 306292
      92c37819
    • Axel Naumann's avatar
      Improve const-correctness. · 19520027
      Axel Naumann authored
      llvm-svn: 306291
      19520027
    • Siddharth Bhat's avatar
      [PPCGCodeGeneration] Add flag to allow polly to fail in GPU kernel fails. · 65d7f72f
      Siddharth Bhat authored
      - This is useful for debugging GPU code.
      
      llvm-svn: 306290
      65d7f72f
    • Sanjay Patel's avatar
      [x86] transform vector inc/dec to use -1 constant (PR33483) · 15748d23
      Sanjay Patel authored
      Convert vector increment or decrement to sub/add with an all-ones constant:
      
      add X, <1, 1...> --> sub X, <-1, -1...>
      sub X, <1, 1...> --> add X, <-1, -1...>
      
      The all-ones vector constant can be materialized using a pcmpeq instruction that is 
      commonly recognized as an idiom (has no register dependency), so that's better than 
      loading a splat 1 constant.
      
      AVX512 uses 'vpternlogd' for 512-bit vectors because there is apparently no better
      way to produce 512 one-bits.
      
      The general advantages of this lowering are:
      1. pcmpeq has lower latency than a memop on every uarch I looked at in Agner's tables, 
         so in theory, this could be better for perf, but...
      
      2. That seems unlikely to affect any OOO implementation, and I can't measure any real 
         perf difference from this transform on Haswell or Jaguar, but...
      
      3. It doesn't look like it from the diffs, but this is an overall size win because we 
         eliminate 16 - 64 constant bytes in the case of a vector load. If we're broadcasting 
         a scalar load (which might itself be a bug), then we're replacing a scalar constant 
         load + broadcast with a single cheap op, so that should always be smaller/better too.
      
      4. This makes the DAG/isel output more consistent - we use pcmpeq already for padd x, -1 
         and psub x, -1, so we should use that form for +1 too because we can. If there's some
         reason to favor a constant load on some CPU, let's make the reverse transform for all
         of these cases (either here in the DAG or in a later machine pass).
      
      This should fix:
      https://bugs.llvm.org/show_bug.cgi?id=33483
      
      Differential Revision: https://reviews.llvm.org/D34336
      
      llvm-svn: 306289
      15748d23
    • Krzysztof Parzyszek's avatar
      918e6d70
    • Jonas Paulsson's avatar
      [SystemZ] Add a check against zero before calling getTestUnderMaskCond() · 8c33647b
      Jonas Paulsson authored
      Csmith discovered that this function can be called with a zero argument,
      in which case an assert for this triggered.
      
      This patch also adds a guard before the other call to this function since
      it was missing, although the test only covers the case where it was
      discovered.
      
      Reduced test case attached as CodeGen/SystemZ/int-cmp-54.ll.
      
      Review: Ulrich Weigand
      llvm-svn: 306287
      8c33647b
    • Michael Zuckerman's avatar
      [X86][LLVM][test]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess test. · ce7e187f
      Michael Zuckerman authored
      Adding base tast (to trunk) for Store strid=4 vf=32. 
      
      llvm-svn: 306286
      ce7e187f
    • Simon Pilgrim's avatar
      [llvm-stress] Remove Rand32 helper function · 3d116189
      Simon Pilgrim authored
      To try and help avoid repeats of PR32585, remove Rand32 which is only called by Rand64
      
      llvm-svn: 306285
      3d116189
    • Siddharth Bhat's avatar
      [PPCGCodeGeneration] Allow intrinsics within kernels. · f291c8d5
      Siddharth Bhat authored
      - In D33414, if any function call was found within a kernel, we would bail out.
      
      - This is an over-approximation. This patch changes this by allowing the
        `llvm.sqrt.*` family of intrinsics.
      
      - This introduces an additional step when creating a separate llvm::Module
        for a kernel (GPUModule). We now copy function declarations from the
        original module to new module.
      
      - We also populate IslNodeBuilder::ValueMap so it replaces the function
        references to the old module to the ones in the new module
        (GPUModule).
      
      Differential Revision: https://reviews.llvm.org/D34145
      
      llvm-svn: 306284
      f291c8d5
    • Andreas Simbuerger's avatar
      [NFC] Return both polly.start and polly.exiting from executeScopConditionally. · 256070d8
      Andreas Simbuerger authored
      This commit returns both the start and the exit block that are created
      by executeScopConditionally.
      
      In a future commit we will make use of the exit block. Before we would
      have to use the implicit property that there won't be any code generated
      between polly.start and polly.exiting at the time of use to find the
      correct block ('polly.exiting').
      
      All usage location are semantically unchanged.
      
      llvm-svn: 306283
      256070d8
    • Peter Smith's avatar
      [ELF] Define _GLOBAL_OFFSET_TABLE_ symbol relative to .got · 113a59e7
      Peter Smith authored
      On many architectures gcc and clang will recognize _GLOBAL_OFFSET_TABLE_ - .
      and produce a relocation that can be processed without needing to know the
      value of _GLOBAL_OFFSET_TABLE_. This is not always the case; for example ARM
      gcc produces R_ARM_BASE_PREL but clang produces the more general
      R_ARM_REL32 to _GLOBAL_OFFSET_TABLE_. To evaluate this relocation
      correctly _GLOBAL_OFFSET_TABLE_ must be defined to be the either the base of
      the GOT or end of the GOT dependent on architecture..
      
      If/when llvm-mc is changed to recognize _GLOBAL_OFFSET_TABLE_ - . this
      change will not be necessary for new objects. However there may still be
      old objects and versions of clang.
      
      Differential Revision: https://reviews.llvm.org/D34355
      
      llvm-svn: 306282
      113a59e7
    • Simon Pilgrim's avatar
      [llvm-stress] Ensure that the C++11 random device respects its min/max values (PR32585) · 1158fe97
      Simon Pilgrim authored
      As noted on PR32585, the change in D29780/rL295325 resulted in calls to Rand32() (values 0 -> 0xFFFFFFFF) but the min()/max() operators indicated it would be (0 -> 0x7FFFF).
      
      This patch changes the random operator to call Rand() instead which does respect the 0 -> 0x7FFFF range and asserts that the value is in range as well.
      
      Differential Revision: https://reviews.llvm.org/D34089
      
      llvm-svn: 306281
      1158fe97
    • Petar Jovanovic's avatar
      [mips] Enable IAS by default for Android 64-bit MIPS target (N64) · c02bda3c
      Petar Jovanovic authored
      IAS is already used for MIPS64 in majority of Android projects.
      Android MIPS64 uses N64 ABI. Set IAS as a default now.
      
      Differential Revision: https://reviews.llvm.org/D34514
      
      llvm-svn: 306280
      c02bda3c
    • Mikael Holmen's avatar
      [IfConversion] Hoist removeBranch calls out of if/else clauses [NFC] · 45bd32f9
      Mikael Holmen authored
      Summary:
      Also added a comment.
      
      Pulled out of https://reviews.llvm.org/D34099.
      
      Reviewers: iteratee
      
      Reviewed By: iteratee
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D34388
      
      llvm-svn: 306279
      45bd32f9
    • Pavel Labath's avatar
      Shorten sanitizer plugin names · 2a1c09fe
      Pavel Labath authored
      Summary:
      The new UndefinedBehaviorSanitizer plugin was breaking file path length
      limits, because it's (fairly long name) appears multiple times in the
      path. Cmake ends up putting the object file at path
      tools/lldb/source/Plugins/InstrumentationRuntime/UndefinedBehaviorSanitizer/CMakeFiles/lldbPluginInstrumentationRuntimeUndefinedBehaviorSanitizer.dir/UndefinedBehaviorSanitizerRuntime.cpp.obj
      which is 191 characters long and very dangerously close to the 260
      character path limit on windows systems (also, just the include line for
      that file was breaking the 80 character line limit).
      
      This renames the sanitizer plugins to use shorter names (asan, ubsan,
      tsan). I think this will still be quite understandable to everyone as
      those are the names everyone uses to refer to them anyway.
      
      Reviewers: zturner, kubamracek, jingham
      
      Subscribers: lldb-commits, mgorny
      
      Differential Revision: https://reviews.llvm.org/D34553
      
      llvm-svn: 306278
      2a1c09fe
    • Craig Topper's avatar
      [IR] Rename BinaryOperator::init to AssertOK and remove argument. Replace... · 700892fd
      Craig Topper authored
      [IR] Rename BinaryOperator::init to AssertOK and remove argument. Replace default case in switch with llvm_unreachable since all valid opcodes are covered.
      
      This method doesn't do any initializing. It just contains asserts. So renaming to AssertOK makes it consistent with similar instructions in other Instruction classes.
      
      llvm-svn: 306277
      700892fd
    • Serguei Katkov's avatar
      This reverts commit r306272. · 0e70206c
      Serguei Katkov authored
      Revert "[MBP] do not rotate loop if it creates extra branch"
      
      It breaks the sanitizer build bots. Need to fix this.
      
      llvm-svn: 306276
      0e70206c
    • Tobias Grosser's avatar
      [bugpoint] Do not initialize disassembler passes · 258245a6
      Tobias Grosser authored
      We added the initilization of disassembler passes in r306208 with the goal to
      bring bugpoint in line with 'opt'. However, 'opt' does itself not initialize
      dissassembler passes. As our goal was consistency, we drop the initialization
      of dissassembler passes again from bugpoint.
      
      Thanks to Chandler for pointing this out!
      
      llvm-svn: 306275
      258245a6
    • Hiroshi Inoue's avatar
      fix trivial typo in comment, NFC · 4484ff03
      Hiroshi Inoue authored
      llvm-svn: 306274
      4484ff03
    • Tobias Grosser's avatar
      [tests] Add forgotten pollyacc REQUIRES line · 2927cb75
      Tobias Grosser authored
      llvm-svn: 306273
      2927cb75