Test Failure: Transforms/DeadStoreElimination/inter-procedural.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
ERROR: Unsupported instruction:   invoke void @p1_write_then_read_raw(ptr %ptr)
          to label %bb1 unwind l
-- 1. PassManager<llvm::Function> : Skipping NOP
-- 2. DSEPass

----------------------------------------
declare void @p1_write_only(nocapture noread noundef dead_on_unwind initializes((0, 2)) ptr)

define i16 @p1_write_only_caller() {
#0:
  %ptr = alloca i64 2, align 2
  store i16 0, ptr %ptr, align 2
  call void @p1_write_only(nocapture noread noundef dead_on_unwind initializes((0, 2)) ptr %ptr)
  %l = load i16, ptr %ptr, align 2
  ret i16 %l
}
Transformation seems to be correct! (syntactically equal)

-- 3. DSEPass

----------------------------------------
declare void @p1_write_only(nocapture noread noundef dead_on_unwind initializes((0, 2)) ptr)

define i16 @p1_write_only_caller() {
#0:
  %ptr = alloca i64 2, align 2
  store i16 0, ptr %ptr, align 2
  call void @p1_write_only(nocapture noread noundef dead_on_unwind initializes((0, 2)) ptr %ptr)
  %l = load i16, ptr %ptr, align 2
  ret i16 %l
}
=>
declare void @p1_write_only(nocapture noread noundef dead_on_unwind initializes((0, 2)) ptr)

define i16 @p1_write_only_caller() {
#0:
  %ptr = alloca i64 2, align 2
  call void @p1_write_only(nocapture noread noundef dead_on_unwind initializes((0, 2)) ptr %ptr)
  %l = load i16, ptr %ptr, align 2
  ret i16 %l
}
Transformation doesn't verify! (unsound)
ERROR: Target is more poisonous than source

Example:

Source:
ptr %ptr = pointer(local, block_id=0, offset=0) / Address=#x100
Function @p1_write_only returned
i16 %l = #x0000 (0)

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

LOCAL BLOCKS:
Block 2 >	size: 2	align: 2	alloc type: 1	alive: true	address: 256

Target:
ptr %ptr = pointer(local, block_id=0, offset=0) / Address=#x100
Function @p1_write_only returned
i16 %l = poison

TARGET MEMORY STATE
===================
LOCAL BLOCKS:
Block 2 >	size: 2	align: 2	alloc type: 1	alive: true	address: 256
Source value: #x0000 (0)
Target value: poison

Pass: DSEPass
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=dse' '-enable-dse-initializes-attr-improvement' '-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_yNMNAEu6_i7Ll.bc"


------------------- SMT STATS -------------------
Num queries: 14
Num invalid: 0
Num skips:   0
Num trivial: 4 (22.2%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     10 (71.4%)
Num UNSAT:   4 (28.6%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/DeadStoreElimination/inter-procedural.ll -passes=dse -enable-dse-initializes-attr-improvement -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/DeadStoreElimination/inter-procedural.ll
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/DeadStoreElimination/inter-procedural.ll
+ /home/nlopes/alive2/build/opt-alive.sh -passes=dse -enable-dse-initializes-attr-improvement -S

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/DeadStoreElimination/inter-procedural.ll

 

<-- Back