diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-27 22:04:28 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-27 22:04:28 +0000 |
commit | 49e6a70fe3e0ec79cf44c47a5503fe2fb5121dd3 (patch) | |
tree | 8c21bb8aca108f408dc52fa087bb19d556c028a3 /llvm/test/Transforms/InstCombine/objsize.ll | |
parent | 2d6d7efb006c431d16a6c522e79617d24064c142 (diff) | |
download | bcm5719-llvm-49e6a70fe3e0ec79cf44c47a5503fe2fb5121dd3.tar.gz bcm5719-llvm-49e6a70fe3e0ec79cf44c47a5503fe2fb5121dd3.zip |
Verifier: Call verifyModule() from llc and opt
Change `llc` and `opt` to run `verifyModule()`. This ensures that we
check the full module before `FunctionPass::doInitialization()` ever
gets called (I was getting crashes in `DwarfDebug` instead of verifier
failures when testing a WIP patch that checks operands of compile
units). In `opt`, also move up debug-info-stripping so that it still
runs before verification.
There was a fair bit of broken code that was sitting in tree.
Interestingly, some were cases of a `select` that referred to itself in
`-instcombine` tests (apparently an intermediate result). I split them
off to `*-noverify.ll` tests with RUN lines like this:
opt < %s -S -disable-verify -instcombine | opt -S | FileCheck %s
This avoids verifying the input file (so we can get the broken code into
`-instcombine), but still verifies the output with a second call to
`opt` (to verify that `-instcombine` will clean it up like it should).
llvm-svn: 233432
Diffstat (limited to 'llvm/test/Transforms/InstCombine/objsize.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/objsize.ll | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/llvm/test/Transforms/InstCombine/objsize.ll b/llvm/test/Transforms/InstCombine/objsize.ll index 3125458549d..335a816e9ec 100644 --- a/llvm/test/Transforms/InstCombine/objsize.ll +++ b/llvm/test/Transforms/InstCombine/objsize.ll @@ -219,43 +219,6 @@ define i32 @test13(i8** %esc) { ret i32 %1 } -; CHECK-LABEL: @PR13390( -define i32 @PR13390(i1 %bool, i8* %a) { -entry: - %cond = or i1 %bool, true - br i1 %cond, label %return, label %xpto - -xpto: - %select = select i1 %bool, i8* %select, i8* %a - %select2 = select i1 %bool, i8* %a, i8* %select2 - %0 = tail call i32 @llvm.objectsize.i32.p0i8(i8* %select, i1 true) - %1 = tail call i32 @llvm.objectsize.i32.p0i8(i8* %select2, i1 true) - %2 = add i32 %0, %1 -; CHECK: ret i32 undef - ret i32 %2 - -return: - ret i32 42 -} - -; CHECK-LABEL: @PR13621( -define i32 @PR13621(i1 %bool) nounwind { -entry: - %cond = or i1 %bool, true - br i1 %cond, label %return, label %xpto - -; technically reachable, but this malformed IR may appear as a result of constant propagation -xpto: - %gep2 = getelementptr i8, i8* %gep, i32 1 - %gep = getelementptr i8, i8* %gep2, i32 1 - %o = call i32 @llvm.objectsize.i32.p0i8(i8* %gep, i1 true) -; CHECK: ret i32 undef - ret i32 %o - -return: - ret i32 7 -} - @globalalias = internal alias [60 x i8]* @a ; CHECK-LABEL: @test18( |