Test Failure: Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<Function> : Skipping NOP
-- 2. FunctionToLoopPassAdaptor

----------------------------------------
@vtable = constant 8 bytes, align 8
foo = constant ? bytes, align 8

define void @test(i1 %c) {
init:
  store ptr foo, ptr @vtable, align 8
  br label %#0

#0:
  br label %loop

loop:
  %fn = load ptr, ptr @vtable, align 8
  call void %fn()
  br i1 %c, label %exit, label %loop

exit:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 3. PassManager<Function> : Skipping NOP
-- 4. LoopSimplifyPass

----------------------------------------
@vtable = constant 8 bytes, align 8
foo = constant ? bytes, align 8

define void @test(i1 %c) {
init:
  store ptr foo, ptr @vtable, align 8
  br label %#0

#0:
  br label %loop

loop:
  %fn = load ptr, ptr @vtable, align 8
  call void %fn()
  br i1 %c, label %exit, label %loop

exit:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 5. LoopSimplifyPass

----------------------------------------
@vtable = constant 8 bytes, align 8
foo = constant ? bytes, align 8

define void @test(i1 %c) {
init:
  store ptr foo, ptr @vtable, align 8
  br label %#0

#0:
  br label %loop

loop:
  %fn = load ptr, ptr @vtable, align 8
  call void %fn()
  br i1 %c, label %exit, label %loop

exit:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 6. LCSSAPass

----------------------------------------
@vtable = constant 8 bytes, align 8
foo = constant ? bytes, align 8

define void @test(i1 %c) {
init:
  store ptr foo, ptr @vtable, align 8
  br label %#0

#0:
  br label %loop

loop:
  %fn = load ptr, ptr @vtable, align 8
  call void %fn()
  br i1 %c, label %exit, label %loop

exit:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 7. LCSSAPass

----------------------------------------
@vtable = constant 8 bytes, align 8
foo = constant ? bytes, align 8

define void @test(i1 %c) {
init:
  store ptr foo, ptr @vtable, align 8
  br label %#0

#0:
  br label %loop

loop:
  %fn = load ptr, ptr @vtable, align 8
  call void %fn()
  br i1 %c, label %exit, label %loop

exit:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 8. PassManager<Function> : Skipping NOP
-- 9. PassManager<Loop, AnalysisManager<Loop, LoopStandardAnalysisResults&>, LoopStandardAnalysisResults&, LPMUpdater&> : Skipping NOP
-- 10. LoopInstSimplifyPass

----------------------------------------
@vtable = constant 8 bytes, align 8
foo = constant ? bytes, align 8

define void @test(i1 %c) {
init:
  store ptr foo, ptr @vtable, align 8
  br label %#0

#0:
  br label %loop

loop:
  %fn = load ptr, ptr @vtable, align 8
  call void %fn()
  br i1 %c, label %exit, label %loop

exit:
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 11. LoopInstSimplifyPass

----------------------------------------
@vtable = constant 8 bytes, align 8
foo = constant ? bytes, align 8

define void @test(i1 %c) {
init:
  store ptr foo, ptr @vtable, align 8
  br label %#0

#0:
  br label %loop

loop:
  %fn = load ptr, ptr @vtable, align 8
  call void %fn()
  br i1 %c, label %exit, label %loop

exit:
  ret void
}
=>
declare void @foo() nofree memory(none)

@vtable = constant 8 bytes, align 8
foo = constant ? bytes, align 8

define void @test(i1 %c) {
init:
  store ptr foo, ptr @vtable, align 8
  br label %#0

#0:
  br label %loop

loop:
  call void @foo() nofree memory(none)
  br i1 %c, label %exit, label %loop

exit:
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
i1 %c = #x0 (0)

Source:
UB triggered on br

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 8	alloc type: 0	alive: false	address: 0
Block 1 >	size: 8	align: 8	alloc type: 0	alive: true	address: 64	const
Block 2 >	size: 8	align: 8	alloc type: 0	alive: true	address: 8	const
Block 3 >	size: 4	align: 4	alloc type: 0	alive: true	address: 4
Block 4 >	size: 1	align: 8	alloc type: 0	alive: true	address: 64

Target:
UB triggered on br


Pass: LoopInstSimplifyPass
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-load-pass-plugin=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-S' '-passes=loop-mssa(loop-instsimplify,simple-loop-unswitch<nontrivial>)' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_gAoFh1no_b8nX.bc"


------------------- SMT STATS -------------------
Num queries: 21
Num invalid: 0
Num skips:   0
Num trivial: 1 (4.5%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     16 (76.2%)
Num UNSAT:   5 (23.8%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh -S -passes="loop-mssa(loop-instsimplify,simple-loop-unswitch<nontrivial>)" < /bitbucket/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll
+ /home/nlopes/alive2/build/opt-alive.sh -S '-passes=loop-mssa(loop-instsimplify,simple-loop-unswitch<nontrivial>)'
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll

 

<-- Back