summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
Commit message (Collapse)AuthorAgeFilesLines
...
* [TextAPI] TBD Reader/WriterJuergen Ributzka2018-11-294-0/+922
| | | | | | | | | | | | | | | | | Add basic infrastructure for reading and writting TBD files (version 1 - 3). The TextAPI library is not used by anything yet (besides the unit tests). Tool support will be added in a separate commit. The TBD format is currently documented in the implementation file (TextStub.cpp). https://reviews.llvm.org/D53945 Update: This contains changes to fix issues discovered by the bots: - add parentheses to silence warnings. - rename variables - use PlatformType from BinaryFormat llvm-svn: 347823
* Revert "[TextAPI] TBD Reader/Writer"Juergen Ributzka2018-11-284-922/+0
| | | | | | Reverting to unbreak bots. llvm-svn: 347809
* [TextAPI] TBD Reader/WriterJuergen Ributzka2018-11-284-0/+922
| | | | | | | | | | | | | Add basic infrastructure for reading and writting TBD files (version 1 - 3). The TextAPI library is not used by anything yet (besides the unit tests). Tool support will be added in a separate commit. The TBD format is currently documented in the implementation file (TextStub.cpp). https://reviews.llvm.org/D53945 llvm-svn: 347808
* Fix DynamicLibraryTests build on Windows when ↵Michael Platings2018-11-281-0/+7
| | | | | | | | | | | | | | | | | LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is ON extract_symbols.py (introduced in D18826) expects all of its library arguments to be in the same directory - typically <config>/lib. DynamicLibraryLib.lib is instead to be found in lib/<config>. This patch intended to make DynamicLibraryLib.lib be created in <config>/lib alongside most of the other libraries. I previously tried passing absolute paths to extract_symbols.py but this generated command lines that were too long for Visual Studio 2015: D54587 Differential Revision: https://reviews.llvm.org/D54701 llvm-svn: 347764
* [ARM, AArch64] Move ARM/AArch64 target parsers intoDavid Spickett2018-11-281-2/+0
| | | | | | | | | | | | | | | | | separate files to enable future changes. This moves ARM and AArch64 target parsing into their own files. They are still accessible through TargetParser.h as before. Several functions in AArch64 which were just forwarders to ARM have been removed. All except AArch64::getFPUName were unused, and that was only used in a test. Which itself was overlapping one in ARM, so it has also been removed. Differential revision: https://reviews.llvm.org/D53980 llvm-svn: 347741
* [Demangle] remove itaniumFindTypesInMangledNamePavel Labath2018-11-272-35/+0
| | | | | | | | | | | | | | | | Summary: This (very specialized) function was added to enable an LLDB use case. Now that a more generic interface (overriding of parser functions - D52992) is available, and LLDB has been converted to use that (D54074), the function is unused and can be removed. Reviewers: erik.pilkington, sgraenitz, rsmith Subscribers: mgorny, hiraditya, christof, libcxx-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D54893 llvm-svn: 347670
* [ARM GlobalISel] Support G_CTLZ and G_CTLZ_ZERO_UNDEFDiana Picus2018-11-261-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can now select CLZ via the TableGen'erated code, so support G_CTLZ and G_CTLZ_ZERO_UNDEF throughout the pipeline for types <= s32. Legalizer: If the CLZ instruction is available, use it for both G_CTLZ and G_CTLZ_ZERO_UNDEF. Otherwise, use a libcall for G_CTLZ_ZERO_UNDEF and lower G_CTLZ in terms of it. In order to achieve this we need to add support to the LegalizerHelper for the legalization of G_CTLZ_ZERO_UNDEF for s32 as a libcall (__clzsi2). We also need to allow lowering of G_CTLZ in terms of G_CTLZ_ZERO_UNDEF if that is supported as a libcall, as opposed to just if it is Legal or Custom. Due to a minor refactoring of the helper function in charge of this, we will also allow the same behaviour for G_CTTZ and G_CTPOP. This is not going to be a problem in practice since we don't yet have support for treating G_CTTZ and G_CTPOP as libcalls (not even in DAGISel). Reg bank select: Map G_CTLZ to GPR. G_CTLZ_ZERO_UNDEF should not make it to this point. Instruction select: Nothing to do. llvm-svn: 347545
* [MetadataTest] Fix off-by-one strncpy warning reported by gcc8. (NFC)Florian Hahn2018-11-251-5/+3
| | | | llvm-svn: 347528
* [unittests] Fix ExpandTilde test to match handling home dirs with trailing slashSimon Atanasyan2018-11-201-2/+2
| | | | | | | | | | | | | | | | | The `expandTildeExpr` routine just replaces a tilde by a home dir path. If the home dir has a trailing slash, the result of substitution will contain double slashes. For example, `HOME=/foo/ ~/bar` gives `/foo//bar`. That corresponds to (at least) Bash behaviour because the following command `$HOME=/foo/ echo ~/bar` prints `/foo//bar`. The `ExpandTilde` test constructs a path expected as the `fs::expand_tilde` call result by calling `path::append` and the expected path has a single slash. This patch fixes that and allows to pass the unittest on hosts where the `HOME` is `/`. Differential Revision: http://reviews.llvm.org/D54752 llvm-svn: 347346
* [unittest] Skip W+X MappedMemoryTests when MPROTECT is enabledMichal Gorny2018-11-201-0/+53
| | | | | | | | | | | Skip all MappedMemoryTest variants that rely on memory pages being mapped for MF_WRITE|MF_EXEC when MPROTECT is enabled on NetBSD. W^X protection causes all those mmap() calls to fail, causing the tests to fail. Differential Revision: https://reviews.llvm.org/D54080 llvm-svn: 347337
* [APInt] Add methods for saturated add and subSanjay Patel2018-11-201-0/+24
| | | | | | | | | | | | This adds the sadd_sat, uadd_sat, ssub_sat, usub_sat methods for performing saturating additions and subtractions to APInt. Split out from D54237. Patch by: nikic (Nikita Popov) Differential Revision: https://reviews.llvm.org/D54332 llvm-svn: 347324
* [PatternMatch] Handle undef vectors consistentlySanjay Patel2018-11-201-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the issue noticed in D54532. The problem is that cst_pred_ty-based matchers like m_Zero() currently do not match scalar undefs (as expected), but *do* match vector undefs. This may lead to optimization inconsistencies in rare cases. There is only one existing test for which output changes, reverting the change from D53205. The reason here is that vector fsub undef, %x is no longer matched as an m_FNeg(). While I think that the new output is technically worse than the previous one, it is consistent with scalar, and I don't think it's really important either way (generally that undef should have been folded away prior to reassociation.) I've also added another test case for this issue based on InstructionSimplify. It took some effort to find that one, as in most cases undef folds are either checked first -- and in the cases where they aren't it usually happens to not make a difference in the end. This is the only case I was able to come up with. Prior to this patch the test case simplified to undef in the scalar case, but zeroinitializer in the vector case. Patch by: @nikic (Nikita Popov) Differential Revision: https://reviews.llvm.org/D54631 llvm-svn: 347318
* [llvm-exegesis][NFC] Some code style cleanupJinsong Ji2018-11-204-1/+38
| | | | | | | | | | | | | Apply review comments of https://reviews.llvm.org/D54185 to other target as well, specifically: 1. make anonymous namespaces as small as possible, avoid using static inside anonymous namespaces 2. Add missing header to some files 3. GetLoadImmediateOpcodem-> getLoadImmediateOpcode 4. Fix typo Differential Revision: https://reviews.llvm.org/D54343 llvm-svn: 347309
* [DebugInfo] DISubprogram flags get their own flags word. NFC.Paul Robinson2018-11-195-123/+126
| | | | | | | | | | | | | This will hold flags specific to subprograms. In the future we could potentially free up scarce bits in DIFlags by moving subprogram-specific flags from there to the new flags word. This patch does not change IR/bitcode formats, that will be done in a follow-up. Differential Revision: https://reviews.llvm.org/D54597 llvm-svn: 347239
* [llvm-exegesis][NFC] More tests for ExegesisTarget::fillMemoryOperands().Clement Courbet2018-11-191-16/+32
| | | | | | | | | | Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D54304 llvm-svn: 347209
* Test commit - delete a trailing space.Michael Platings2018-11-191-1/+1
| | | | llvm-svn: 347193
* [ProfileSummary] Standardize methods and fix commentVedant Kumar2018-11-191-10/+10
| | | | | | | | | | | | | | | | | | | | | Every Analysis pass has a get method that returns a reference of the Result of the Analysis, for example, BlockFrequencyInfo &BlockFrequencyInfoWrapperPass::getBFI(). I believe that ProfileSummaryInfo::getPSI() is the only exception to that, as it was returning a pointer. Another change is renaming isHotBB and isColdBB to isHotBlock and isColdBlock, respectively. Most methods use BB as the argument of variable names while methods usually refer to Basic Blocks as Blocks, instead of BB. For example, Function::getEntryBlock, Loop:getExitBlock, etc. I also fixed one of the comments. Patch by Rodrigo Caetano Rocha! Differential Revision: https://reviews.llvm.org/D54669 llvm-svn: 347182
* [VFS] Update unittest to fix Windows buildbot.Volodymyr Sapsai2018-11-161-6/+6
| | | | | | | | | Buildbot http://lab.llvm.org:8011/builders/clang-x64-windows-msvc is failing because it doesn't like paths in VFS, make them more Windows-friendly. Follow up to r347009. llvm-svn: 347016
* [VFS] Implement `RedirectingFileSystem::getRealPath`.Volodymyr Sapsai2018-11-161-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | It fixes the case when Objective-C framework is added as a subframework through a symlink. When parent framework infers a module map and fails to detect a symlink, it would add a subframework as a submodule. And when we parse module map for the subframework, we would encounter an error like > error: umbrella for module 'WithSubframework.Foo' already covers this directory By implementing `getRealPath` "an egregious but useful hack" in `ModuleMap::inferFrameworkModule` works as expected. rdar://problem/45821279 Reviewers: bruno, benlangmuir, erik.pilkington Reviewed By: bruno Subscribers: hiraditya, dexonsmith, JDevlieghere, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D54245 llvm-svn: 347009
* Re-apply r346985: [ADT] Drop llvm::Optional clang-specific optimization for ↵Tom Stellard2018-11-161-8/+0
| | | | | | | | | trivially copyable types Remove a test case that was added with the optimization we are now removing. llvm-svn: 347004
* [BinaryFormat] Add MsgPackTypesScott Linder2018-11-152-0/+189
| | | | | | | | | Add data structure to represent MessagePack "documents" and convert to/from both MessagePack and YAML encodings. Differential Revision: https://reviews.llvm.org/D48175 llvm-svn: 346978
* [Support] Teach YAMLIO about polymorphic typesScott Linder2018-11-141-0/+233
| | | | | | | | | | | | | | | | | | | | | Add support for "polymorphic" types to YAMLIO. PolymorphicTraits can dynamically switch between other traits (Scalar, Map, or Sequence). When inputting, the PolymorphicTraits type is told which type to become, and when outputting the PolymorphicTraits type is asked which type it currently is. Also add support for TaggedScalarTraits to allow dynamically differentiating between multiple scalar types using YAML tags. Serialize empty maps as "{}" and empty sequences as "[]", so that types are preserved when round-tripping PolymorphicTraits. This change has equivalent semantics, but may break e.g. tests which compare output verbatim. Differential Revision: https://reviews.llvm.org/D48144 llvm-svn: 346884
* [VPlan, SLP] Add simple SLP analysis on top of VPlan.Florian Hahn2018-11-142-0/+900
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an initial implementation of the look-ahead SLP tree construction described in 'Look-Ahead SLP: Auto-vectorization in the Presence of Commutative Operations, CGO 2018 by Vasileios Porpodas, Rodrigo C. O. Rocha, Luís F. W. Góes'. It returns an SLP tree represented as VPInstructions, with combined instructions represented as a single, wider VPInstruction. This initial version does not support instructions with multiple different users (either inside or outside the SLP tree) or non-instruction operands; it won't generate any shuffles or insertelement instructions. It also just adds the analysis that builds an SLP tree rooted in a set of stores. It does not include any cost modeling or memory legality checks. The plan is to integrate it with VPlan based cost modeling, once available and to only apply it to operations that can be widened. A follow-up patch will add a support for replacing instructions in a VPlan with their SLP counter parts. Reviewers: Ayal, mssimpso, rengolin, mkuper, hfinkel, hsaito, dcaballe, vporpo, RKSimon, ABataev Reviewed By: rengolin Differential Revision: https://reviews.llvm.org/D4949 llvm-svn: 346857
* Correctly instantiate `iterator_adaptor_base` when defining `pointer_iterator`David Blaikie2018-11-141-0/+29
| | | | | | | | | | | | | | | | The definition of `pointer_iterator` omits what should be a `iterator_traits::<>::iterator_category` parameter from `iterator_adaptor_base`. As a result, iterators based on `pointer_iterator` always have defaulted value types and the wrong iterator category. The definition of `pointee_iterator` just a few lines above does this correctly. This resolves [[ https://bugs.llvm.org/show_bug.cgi?id=39617 | bug 39617 ]]. Patch by Dylan MacKenzie! Reviewers: dblaikie Differential Revision: https://reviews.llvm.org/D54377 llvm-svn: 346833
* Make the ExpandTilde unit test expect "\" (not "/") on Win32Matthew Voss2018-11-131-0/+6
| | | | llvm-svn: 346813
* DebugInfo: Add a CU metadata attribute for use of DWARF ranges base address ↵David Blaikie2018-11-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | specifiers Summary: Ranges base address specifiers can save a lot of object size in relocation records especially in optimized builds. For an optimized self-host build of Clang with split DWARF and debug info compression in object files, but uncompressed debug info in the executable, this change produces about 18% smaller object files and 6% larger executable. While it would've been nice to turn this on by default, gold's 32 bit gdb-index support crashes on this input & I don't think there's any perfect heuristic to implement solely in LLVM that would suffice - so we'll need a flag one way or another (also possible people might want to aggressively optimized for executable size that contains debug info (even with compression this would still come at some cost to executable size)) - so let's plumb it through. Differential Revision: https://reviews.llvm.org/D54242 llvm-svn: 346788
* [FileSystem] Add expand_tilde functionJonas Devlieghere2018-11-131-0/+21
| | | | | | | | | | | | In D54435 there was some discussion about the expand_tilde flag for real_path that I wanted to expose through the VFS. The consensus is that these two things should be separate functions. Since we already have the code for this I went ahead and added a function expand_tilde that does just that. Differential revision: https://reviews.llvm.org/D54448 llvm-svn: 346776
* [CSP, Cloning] Update DuplicateInstructionsInSplitBetween to use DomTreeUpdater.Florian Hahn2018-11-131-6/+13
| | | | | | | | | | | | | | | | | | | | | This patch updates DuplicateInstructionsInSplitBetween to update a DTU instead of applying updates to the DT directly. Given that there only are 2 users, also updated them in this patch to avoid churn. I slightly moved the code in CallSiteSplitting around to reduce the places where we have to pass in DTU. If necessary, I could split those changes in a separate patch. This fixes missing DT updates when dealing with musttail calls in CallSiteSplitting, by using DTU->deleteBB. Reviewers: junbuml, kuhar, NutshellySima, indutny, brzycki Reviewed By: NutshellySima llvm-svn: 346769
* [Support] Make error banner optional in logAllUnhandledErrorsJonas Devlieghere2018-11-112-17/+13
| | | | | | | | In a lot of places an empty string was passed as the ErrorBanner to logAllUnhandledErrors. This patch makes that argument optional to simplify the call sites. llvm-svn: 346604
* [AArch64] Support HiSilicon's TSV110 processorBryan Chan2018-11-092-3/+35
| | | | | | | | | | | | Reviewers: t.p.northover, SjoerdMeijer, kristof.beyls Reviewed By: kristof.beyls Subscribers: olista01, javed.absar, kristof.beyls, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D53908 llvm-svn: 346546
* Revert "[VFS] Add "expand tilde" argument to getRealPath."Sam McCall2018-11-091-2/+2
| | | | | | | This reverts commit r346453. This is a complex change to a widely-used interface, and was not reviewed. llvm-svn: 346500
* [llvm-exegesis] Fix unit tests on PowerPC/AArch64.Clement Courbet2018-11-092-4/+6
| | | | | | We were comparing char*s and not contents. Introduced in rL346489. llvm-svn: 346493
* [llvm-exegesis][NFC] Add a way to declare the default counter binding for ↵Clement Courbet2018-11-092-0/+12
| | | | | | | | | | | | | | | | unbound CPUs for a target. Summary: This simplifies the code and moves everything to tablegen for consistency. This also prepares the ground for adding issue counters. Reviewers: gchatelet, john.brawn, jsji Subscribers: nemanjai, mgorny, javed.absar, kbarton, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D54297 llvm-svn: 346489
* [XRay] Improve FDR trace handling and error messagingDean Michael Berris2018-11-091-9/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change covers a number of things spanning LLVM and compiler-rt, which are related in a non-trivial way. In LLVM, we have a library that handles the FDR mode even log loading, which uses C++'s runtime polymorphism feature to better faithfully represent the events that are written down by the FDR mode runtime. We do this by interpreting a trace that's serliased in a common format agreed upon by both the trace loading library and the FDR mode runtime. This library is under active development, which consists of features allowing us to reconstitute a higher-level event log. This event log is used by the conversion and visualisation tools we have for interpreting XRay traces. One of the tools we have is a diagnostic tool in llvm-xray called `fdr-dump` which we've been using to debug our expectations of what the FDR runtime should be writing and what the logical FDR event log structures are. We use this fairly extensively to reason about why some non-trivial traces we're generating with FDR mode runtimes fail to convert or fail to parse correctly. One of these failures we've found in manual debugging of some of the traces we've seen involve an inconsistency between the buffer extents (a record indicating how many bytes to follow are part of a logical thread's event log) and the record of the bytes written into the log -- sometimes it turns out the data could be garbage, due to buffers being recycled, but sometimes we're seeing the buffer extent indicating a log is "shorter" than the actual records associated with the buffer. This case happens particularly with function entry records with a call argument. This change for now updates the FDR mode runtime to write the bytes for the function call and arg record before updating the buffer extents atomically, allowing multiple threads to see a consistent view of the data in the buffer using the atomic counter associated with a buffer. What we're trying to prevent here is partial updates where we see the intermediary updates to the buffer extents (function record size then call argument record size) becoming observable from another thread, for instance, one doing the serialization/flushing. To do both diagnose this issue properly, we need to be able to honour the extents being set in the `BufferExtents` records marking the beginning of the logical buffers when reading an FDR trace. Since LLVM doesn't use C++'s RTTI mechanism, we instead follow the advice in the documentation for LLVM Style RTTI (https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html). We then rely on this RTTI feature to ensure that our file-based record producer (our streaming "deserializer") can honour the extents of individual buffers as we interpret traces. This also sets us up to be able to eventually do smart skipping/continuation of FDR logs, seeking instead to find BufferExtents records in cases where we find potentially recoverable errors. In the meantime, we make this change to operate in a strict mode when reading logical buffers with extent records. Reviewers: mboerger Subscribers: hiraditya, llvm-commits, jfb Differential Revision: https://reviews.llvm.org/D54201 llvm-svn: 346473
* [VFS] Add "expand tilde" argument to getRealPath.Jonas Devlieghere2018-11-091-2/+2
| | | | | | | Add an optional argument to expand tildes in the path to mirror llvm's implementation of the corresponding function. llvm-svn: 346453
* [SelectionDAG] Assert on the width of DemandedElts argument to ↵Craig Topper2018-11-081-2/+2
| | | | | | | | computeKnownBits for all vector typed operations not just build_vector. Fix AArch64 unit test that fails with the assertion added. llvm-svn: 346437
* [PowerPC][llvm-exegesis] Add a PowerPC targetJinsong Ji2018-11-084-0/+182
| | | | | | | | | This is patch to add PowerPC target to llvm-exegesis. The target does just enough to be able to run llvm-exegesis in latency mode for at least some opcodes. Differential Revision: https://reviews.llvm.org/D54185 llvm-svn: 346411
* [SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCondMax Kazantsev2018-11-081-1/+1
| | | | | | | | | | | | | | | | | | We have a lot of various bugs that are caused by misuse of SCEV (in particular in LV), all of them can simply be described as "we ask SCEV to prove some fact on invalid IR". Some of examples of those are PR36311, PR37221, PR39160. The problem is that these failues manifest differently (what we saw was failure of various asserts across SCEV, but there can also be miscompiles). This patch adds an assert into two SCEV methods that strongly rely on correctness of the IR and are involved in known failues. This will at least allow us to have a clear indication of what was wrong in this case. This patch also fixes a unit test with incorrect IR that fails this verification. Differential Revision: https://reviews.llvm.org/D52930 Reviewed By: fhahn llvm-svn: 346389
* Extend virtual file system with `isLocal` methodJonas Devlieghere2018-11-081-0/+11
| | | | | | | | Expose the `llvm::sys::fs::is_local` function through the VFS. Differential revision: https://reviews.llvm.org/D54127 llvm-svn: 346372
* Fix unit tests after patch https://reviews.llvm.org/rL346313Calixte Denizet2018-11-071-465/+474
| | | | | | | | | | | | | | Summary: Tests are broken so fix them. Reviewers: marco-c Reviewed By: marco-c Subscribers: sylvestre.ledru, llvm-commits Differential Revision: https://reviews.llvm.org/D54208 llvm-svn: 346318
* [XRay] Use TSC delta encoding for custom/typed eventsDean Michael Berris2018-11-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change updates the version number for FDR logs to 5, and update the trace processing to support changes in the custom event records. In the runtime, since we're already writing down the record preamble to handle CPU migrations and TSC wraparound, we can use the same TSC delta encoding in the custom event and typed event records that we use in function event records. We do the same change to typed events (which were unsupported before this change in the trace processing) which now show up in the trace. Future changes should increase our testing coverage to make custom and typed events as first class entities in the FDR mode log processing tools. This change is also a good example of how we end up supporting new record types in the FDR mode implementation. This shows the places where new record types are added and supported. Depends on D54139. Reviewers: mboerger Subscribers: hiraditya, arphaman, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D54140 llvm-svn: 346293
* MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFCMatthias Braun2018-11-056-36/+42
| | | | | | | | MachineModuleInfo can only be used in code using lib/CodeGen, hence we can keep a more specific reference to LLVMTargetMachine rather than just TargetMachine around. llvm-svn: 346182
* [ValueTracking] determine sign of 0.0 from select when matching min/max FPSanjay Patel2018-11-041-31/+53
| | | | | | | | | | | | | | | | | | | In PR39475: https://bugs.llvm.org/show_bug.cgi?id=39475 ..we may fail to recognize/simplify fabs() in some cases because we do not canonicalize fcmp with a -0.0 operand. Adding that canonicalization can cause regressions on min/max FP tests, so that's this patch: for the purpose of determining whether something is min/max, let the value returned by the select determine how we treat a 0.0 operand in the fcmp. This patch doesn't actually change the -0.0 to +0.0. It just changes the analysis, so we don't fail to recognize equivalent min/max patterns that only differ in the signbit of 0.0. Differential Revision: https://reviews.llvm.org/D54001 llvm-svn: 346097
* [SelectionDAG] Remove special methods for creating *_EXTEND_VECTOR_INREG ↵Craig Topper2018-11-041-2/+2
| | | | | | | | | | nodes. Move asserts into getNode. These methods were just wrappers around getNode with additional asserts (identical and repeated 3 times). But getNode already has a switch that can be used to hold these asserts that allows them to be shared for all 3 opcodes. This also enables checking on the places that create these nodes without using the wrappers. The rest of the patch is just changing all callers to use getNode directly. llvm-svn: 346087
* [ValueTracking] peek through 2-input shuffles in ComputeNumSignBitsSanjay Patel2018-11-031-2/+1
| | | | | | | | | | | This patch gives the IR ComputeNumSignBits the same functionality as the DAG version (the code is derived from the existing code). This an extension of the single input shuffle analysis added with D53659. Differential Revision: https://reviews.llvm.org/D53987 llvm-svn: 346071
* [ValueTracking] add test for non-canonical shuffle; NFCSanjay Patel2018-11-021-0/+23
| | | | llvm-svn: 346025
* [ValueTracking] allow non-canonical shuffles when computing signbitsSanjay Patel2018-11-021-0/+20
| | | | | | | This possibility is noted in D53987 for a different case, so we need to adjust the existing code. llvm-svn: 345988
* Allow null-valued function operands in getCalledFunction()David Stenberg2018-11-021-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Change the dynamic cast in CallBase::getCalledFunction() to allow null-valued function operands. This patch fixes a crash that occurred when a funtion operand of a call instruction was dropped, and later on a metadata-carrying instruction was printed out. When allocating the metadata slot numbers, getCalledFunction() would be invoked on the call with the dropped operand, resulting in a failed non-null assertion in isa<>. This fixes PR38924, in which a printout in DBCE crashed due to this. This aligns getCalledFunction() with getCalledValue(), as the latter allows the operand to be null. Reviewers: vsk, dexonsmith, hfinkel Reviewed By: dexonsmith Subscribers: hfinkel, llvm-commits Differential Revision: https://reviews.llvm.org/D52537 llvm-svn: 345966
* [XRay] Fix tests with updated fdr-dumpDean Michael Berris2018-11-021-4/+4
| | | | | | Follow-up to D54022. llvm-svn: 345955
* [AliasSetTracker] Misc cleanup (NFCI)Alina Sbirlea2018-11-011-0/+2
| | | | | Summary: Remove two redundant checks, add one in the unit test. Remove an unused method. Fix computation of TotalMayAliasSetSize. llvm-svn: 345911
OpenPOWER on IntegriCloud