Test Failure: Transforms/CodeGenPrepare/AMDGPU/bypass-slow-div-debug-info-inseltpoison.ll

Test source: git

Log:

Source: /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/AMDGPU/bypass-slow-div-debug-info-inseltpoison.ll

----------------------------------------
define i64 @sdiv64(i64 %a, i64 %b) {
%0:
  %d = sdiv i64 %a, %b
  ret i64 %d
}
=>
define i64 @sdiv64(i64 %a, i64 %b) {
%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 ]
  ret i64 %12
}
Transformation doesn't verify! (unsound)
ERROR: Source is more defined than target

Example:
i64 %a = undef
i64 %b = #x0000000010000000 (268435456)

Source:
i64 %d = #x0000000000000000 (0)	[based on undef value]

Target:
i64 %4 = #x0000000010000000 (268435456)
i64 %5 = #x0000000000000000 (0)
i1 %6 = #x1 (1)
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' '-mtriple=amdgcn-amd-amdhsa' '-codegenprepare' '/bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/AMDGPU/bypass-slow-div-debug-info-inseltpoison.ll' '-tv' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'


------------------- SMT STATS -------------------
Num queries: 4
Num invalid: 0
Num skips:   0
Num trivial: 6 (60.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     4 (100.0%)
Num UNSAT:   0 (0.0%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -S -mtriple=amdgcn-amd-amdhsa -codegenprepare /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/AMDGPU/bypass-slow-div-debug-info-inseltpoison.ll
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/AMDGPU/bypass-slow-div-debug-info-inseltpoison.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/CodeGenPrepare/AMDGPU/bypass-slow-div-debug-info-inseltpoison.ll

 

<-- Back