Test Failure: Transforms/SimplifyCFG/sink-cb-diff-attrs.ll

Test source: git

Log:

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

----------------------------------------
declare ptr @foo0()
declare void @side.effect()

define ptr @test_sink_no_args_oneside(i1 %c) {
#0:
  br i1 %c, label %if, label %else

else:
  %r2 = call ptr @foo0() nofree memory(read)
  br label %end

if:
  call void @side.effect()
  %r = call ptr @foo0()
  br label %end

end:
  %pr = phi ptr [ %r, %if ], [ %r2, %else ]
  ret ptr %pr
}
Transformation seems to be correct! (syntactically equal)

-- 3. SimplifyCFGPass

----------------------------------------
declare ptr @foo0()
declare void @side.effect()

define ptr @test_sink_no_args_oneside(i1 %c) {
#0:
  br i1 %c, label %if, label %else

else:
  %r2 = call ptr @foo0() nofree memory(read)
  br label %end

if:
  call void @side.effect()
  %r = call ptr @foo0()
  br label %end

end:
  %pr = phi ptr [ %r, %if ], [ %r2, %else ]
  ret ptr %pr
}
=>
declare void @side.effect()
declare ptr @foo0()

define ptr @test_sink_no_args_oneside(i1 %c) {
#0:
  br i1 %c, label %if, label %end

if:
  call void @side.effect()
  br label %end

end:
  %r2 = call ptr @foo0()
  ret ptr %r2
}
Transformation doesn't verify! (unsound)
ERROR: Mismatch in memory

Example:
i1 %c = #x0 (0)

Source:
  >> Jump to %else
ptr %r2 = null
  >> Jump to %end
ptr %pr = null

SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: #x0
Block 1 >	size: 0	align: 1	alloc type: 0	alive: true	address: #xd
Block 2 >	size: 0	align: 1	alloc type: 4	alive: true	address: #x8

Target:
  >> Jump to %end
ptr %r2 = null

TARGET MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 >	size: 0	align: 1	alloc type: 0	alive: false	address: #x0
Block 1 >	size: 0	align: 1	alloc type: 0	alive: true	address: #xd
Block 2 >	size: 2	align: 1	alloc type: 4	alive: true	address: #x8

Mismatch in pointer(non-local, block_id=2, offset=0)
Source value: poison
Target value: poison

Pass: SimplifyCFGPass
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' '-passes=simplifycfg<sink-common-insts>' '-simplifycfg-require-and-preserve-domtree=1' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'

Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_4qV13WCT_r7W1.bc"

------------------- SMT STATS -------------------
Num queries: 49
Num invalid: 0
Num skips:   0
Num trivial: 5 (9.3%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     31 (63.3%)
Num UNSAT:   18 (36.7%)
Alive2: Transform doesn't verify; aborting!

stderr:

Transforms/SimplifyCFG/sink-cb-diff-attrs.ll' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
/home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/sink-cb-diff-attrs.ll -passes='simplifycfg<sink-common-insts>' -simplifycfg-require-and-preserve-domtree=1 -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/sink-cb-diff-attrs.ll
# executed command: /home/nlopes/alive2/build/opt-alive.sh '-passes=simplifycfg<sink-common-insts>' -simplifycfg-require-and-preserve-domtree=1 -S
# .---command stderr------------
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/sink-cb-diff-attrs.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/SimplifyCFG/sink-cb-diff-attrs.ll
# `-----------------------------
# error: command failed with exit status: 2

--

 

NOTE: This test would pass if undef didn't exist!

 

<-- Back