Test Failure: Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-not-exact.ll

Test source: git

Log:

Source: <stdin>
-- 1. RequireAnalysisPass<ProfileSummaryAnalysis, Module> : Skipping NOP
-- 2. RequireAnalysisPass<ProfileSummaryAnalysis, Module> : Skipping NOP
-- 3. ModuleToFunctionPassAdaptor

----------------------------------------
define void @test(i64 %a, i64 %b, ptr %retptr) {
#0:
  %d = sdiv i64 %a, %b
  store i64 %d, ptr %retptr, align 8
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 1. PassManager<Function> : Skipping NOP
-- 2. CodeGenPreparePass

----------------------------------------
define void @test(i64 %a, i64 %b, ptr %retptr) {
#0:
  %d = sdiv i64 %a, %b
  store i64 %d, ptr %retptr, align 8
  ret void
}
Transformation seems to be correct! (syntactically equal)

-- 3. CodeGenPreparePass

----------------------------------------
define void @test(i64 %a, i64 %b, ptr %retptr) {
#0:
  %d = sdiv i64 %a, %b
  store i64 %d, ptr %retptr, align 8
  ret void
}
=>
define void @test(i64 %a, i64 %b, ptr %retptr) {
#0:
  %#4 = or i64 %a, %b
  %#5 = and i64 %#4, -4294967296
  %#6 = icmp eq i64 %#5, 0
  br i1 %#6, label %#2, label %#1

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

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

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

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

Source:
i64 %d = 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: 1	alloc type: 0	alive: true	address: 8

Target:
i64 %#4 = poison
i64 %#5 = poison
i1 %#6 = poison
UB triggered on br


Pass: CodeGenPreparePass
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=require<profile-summary>,function(codegenprepare)' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_tJ3e0cZ9_FJiF.bc"


------------------- SMT STATS -------------------
Num queries: 32
Num invalid: 0
Num skips:   0
Num trivial: 2 (5.9%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     24 (75.0%)
Num UNSAT:   8 (25.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 1: /home/nlopes/alive2/build/opt-alive.sh -S -passes='require<profile-summary>,function(codegenprepare)' < /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-not-exact.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-not-exact.ll
+ /home/nlopes/alive2/build/opt-alive.sh -S '-passes=require<profile-summary>,function(codegenprepare)'
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/NVPTX/bypass-slow-div-not-exact.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-not-exact.ll

 

<-- Back