Test Failure: Transforms/StraightLineStrengthReduce/slsr-add.ll

Test source: git

Log:

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

----------------------------------------
declare void @foo(i32)

define void @shl(i32 %b, i32 %s) {
#0:
  %t1 = add i32 %b, %s
  call void @foo(i32 %t1)
  %s2 = shl i32 %s, 1
  %t2 = add i32 %b, %s2
  call void @foo(i32 %t2)
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 3. StraightLineStrengthReducePass

----------------------------------------
declare void @foo(i32)

define void @shl(i32 %b, i32 %s) {
#0:
  %t1 = add i32 %b, %s
  call void @foo(i32 %t1)
  %s2 = shl i32 %s, 1
  %t2 = add i32 %b, %s2
  call void @foo(i32 %t2)
  ret void
}
=>
declare void @foo(i32)

define void @shl(i32 %b, i32 %s) {
#0:
  %t1 = add i32 %b, %s
  call void @foo(i32 %t1)
  %t2 = add i32 %t1, %s
  call void @foo(i32 %t2)
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
i32 %b = #x00000003 (3)
i32 %s = undef

Source:
i32 %t1 = #x00000006 (6)	[based on undef]
Function @foo returned
i32 %s2 = #x00000006 (6)	[based on undef]
i32 %t2 = #x00000009 (9)	[based on undef]
void = function did not return!

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

Target:
i32 %t1 = #x00000003 (3)
Function @foo returned
i32 %t2 = #x00000004 (4)
void = function did not return!

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


Pass: StraightLineStrengthReducePass
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=slsr,gvn' '-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_sG5DhdGR_yh8S.bc"

------------------- SMT STATS -------------------
Num queries: 30
Num invalid: 0
Num skips:   0
Num trivial: 7 (18.9%)
Num timeout: 2 (6.7%)
Num errors:  0 (0.0%)
Num SAT:     25 (83.3%)
Num UNSAT:   3 (10.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

Transforms/StraightLineStrengthReduce/slsr-add.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/StraightLineStrengthReduce/slsr-add.ll -passes=slsr,gvn -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-add.ll
# executed command: /home/nlopes/alive2/build/opt-alive.sh -passes=slsr,gvn -S
# .---command stderr------------
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-add.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/StraightLineStrengthReduce/slsr-add.ll
# `-----------------------------
# error: command failed with exit status: 2

--

 

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

 

<-- Back