summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/conditional-temporaries.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang][NewPM] Add -fno-experimental-new-pass-manager to testsLeonard Chan2019-06-211-6/+20
| | | | | | | | | | | | | | | | As per the discussion on D58375, we disable test that have optimizations under the new PM. This patch adds -fno-experimental-new-pass-manager to RUNS that: - Already run with optimizations (-O1 or higher) that were missed in D58375. - Explicitly test new PM behavior along side some new PM RUNS, but are missing this flag if new PM is enabled by default. - Specify -O without the number. Based on getOptimizationLevel(), it seems the default is 2, and the IR appears to be the same when changed to -O2, so update the test to explicitly say -O2 and provide -fno-experimental-new-pass-manager`. Differential Revision: https://reviews.llvm.org/D63156 llvm-svn: 364066
* Avoid creating conditional cleanup blocks that contain only ↵Richard Smith2018-08-041-8/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @llvm.lifetime.end calls When a non-extended temporary object is created in a conditional branch, the lifetime of that temporary ends outside the conditional (at the end of the full-expression). If we're inserting lifetime markers, this means we could end up generating if (some_cond) { lifetime.start(&tmp); Tmp::Tmp(&tmp); } // ... if (some_cond) { lifetime.end(&tmp); } ... for a full-expression containing a subexpression of the form `some_cond ? Tmp().x : 0`. This patch moves the lifetime start for such a temporary out of the conditional branch so that we don't need to generate an additional basic block to hold the lifetime end marker. This is disabled if we want precise lifetime markers (for asan's stack-use-after-scope checks) or of the temporary has a non-trivial destructor (in which case we'd generate an extra basic block anyway to hold the destructor call). Differential Revision: https://reviews.llvm.org/D50286 llvm-svn: 338945
* Add RUN line for amdgcn to lit test conditional-temporaries.cppYaxun Liu2018-06-161-0/+2
| | | | | | This is partial re-commit of r332982. llvm-svn: 334886
* Revert r332982 Call CreateTempMemWithoutCast for ActiveFlagYaxun Liu2018-05-221-1/+0
| | | | | | Due to regression on arm. llvm-svn: 332991
* Call CreateTempMemWithoutCast for ActiveFlagYaxun Liu2018-05-221-0/+1
| | | | | | | | | | | | | | | | Introduced CreateMemTempWithoutCast and CreateTemporaryAllocaWithoutCast to emit alloca without casting to default addr space. ActiveFlag is a temporary variable emitted for clean up. It is defined as AllocaInst* type and there is a cast to AlllocaInst in SetActiveFlag. An alloca casted to generic pointer causes assertion in SetActiveFlag. Since there is only load/store of ActiveFlag, it is safe to use the original alloca, therefore use CreateMemTempWithoutCast is called. Differential Revision: https://reviews.llvm.org/D47099 llvm-svn: 332982
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-3/+3
| | | | | | tests fail. llvm-svn: 188447
* Update test.Anders Carlsson2010-02-041-2/+2
| | | | llvm-svn: 95312
* Fix a bug where we would not mark temporaries as conditional when emitting a ↵Anders Carlsson2010-02-041-0/+6
| | | | | | conditional operator as an lvalue. llvm-svn: 95311
* Improve conditional temporaries test.Anders Carlsson2010-02-041-7/+20
| | | | llvm-svn: 95310
* Improve test.Anders Carlsson2010-02-041-19/+27
| | | | llvm-svn: 95306
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Fix lifetime of conditional temporaries. Patch by Victor Zverovich!Anders Carlsson2009-11-201-0/+28
llvm-svn: 89467
OpenPOWER on IntegriCloud