Test Failure: Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-special-cases.ll

Test source: git

Log:

Source: <stdin>

----------------------------------------
define void @Test_no_bypassing(i32 %a, i64 %b, ptr %retptr) {
#0:
  %a.1 = zext i32 %a to i64
  %a.2 = sub i64 -1, %a.1
  %res = srem i64 %a.2, %b
  store i64 %res, ptr %retptr, align 8
  ret void
}
Transformation seems to be correct! (syntactically equal)


----------------------------------------
define void @Test_check_one_operand(i64 %a, i32 %b, ptr %retptr) {
#0:
  %b.1 = zext i32 %b to i64
  %res = sdiv i64 %a, %b.1
  store i64 %res, ptr %retptr, align 8
  ret void
}
=>
define void @Test_check_one_operand(i64 %a, i32 %b, ptr %retptr) {
#0:
  %b.1 = zext i32 %b to i64
  %#4 = and i64 %a, -4294967296
  %#5 = icmp eq i64 %#4, 0
  br i1 %#5, label %#2, label %#1

#1:
  %#6 = sdiv i64 %a, %b.1
  br label %#3

#2:
  %#7 = trunc i64 %b.1 to i32
  %#8 = trunc i64 %a to i32
  %#9 = udiv i32 %#8, %#7
  %#10 = zext i32 %#9 to i64
  br label %#3

#3:
  %#11 = phi i64 [ %#10, %#2 ], [ %#6, %#1 ]
  store i64 %#11, ptr %retptr, align 8
  ret void
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
i64 %a = poison
i32 %b = #x00000001 (1)
ptr %retptr = pointer(non-local, block_id=1, offset=0)

Source:
i64 %b.1 = #x0000000000000001 (1)
i64 %res = poison

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

Target:
i64 %b.1 = #x0000000000000001 (1)
i64 %#4 = poison
i1 %#5 = poison
UB triggered on br


Pass: 
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-tv' '-S' '-codegenprepare' '-tv' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'


------------------- SMT STATS -------------------
Num queries: 29
Num invalid: 0
Num skips:   0
Num trivial: 4 (12.1%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     20 (69.0%)
Num UNSAT:   9 (31.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh -S -codegenprepare < /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-special-cases.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-special-cases.ll
+ /home/nlopes/alive2/build/opt-alive.sh -S -codegenprepare
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-special-cases.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-special-cases.ll

 

<-- Back