Test source: git
Comments: LLVM bug: load widening of i8 -> i64
Source: <stdin>
----------------------------------------
declare i32 @bcmp(nocapture ptr, nocapture ptr, i64)
define i32 @bcmp8(ptr nocapture nowrite %x, ptr nocapture nowrite %y) {
#0:
%call = tail bcmp ptr nocapture nowrite %x, ptr nocapture nowrite %y, i64 8
ret i32 %call
}
=>
define i32 @bcmp8(ptr nocapture nowrite %x, ptr nocapture nowrite %y) {
#0:
%#1 = load i64, ptr nocapture nowrite %x, align 1
%#2 = load i64, ptr nocapture nowrite %y, align 1
%#3 = icmp ne i64 %#1, %#2
%#4 = zext i1 %#3 to i32
ret i32 %#4
}
Transformation doesn't verify! (unsound)
ERROR: Target is more poisonous than source
Example:
ptr nocapture nowrite %x = pointer(non-local, block_id=1, offset=6, attrs=3) / Address=#x0e
ptr nocapture nowrite %y = pointer(non-local, block_id=1, offset=2, attrs=3) / Address=#x0a
Source:
i32 %call = #x00000008 (8)
SOURCE MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: #x00
Block 1 > size: 15 align: 1 alloc type: 0 alive: true address: #x08
Contents:
6: #x00
7: #x00
3: null, byte offset=0
9: #x00
2: #x00
8: #x00
5: #x08
4: null, byte offset=0
*: #x06
Block 2 > size: 0 align: 1 alloc type: 4 alive: true address: #x01
Target:
i64 %#1 = #x0606060600000000 (434041036927401984)
i64 %#2 = poison
i1 %#3 = poison
i32 %#4 = poison
TARGET MEMORY STATE
===================
NON-LOCAL BLOCKS:
Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: #x00
Block 1 > size: 15 align: 1 alloc type: 0 alive: true address: #x08
Contents:
6: #x00
7: #x00
3: null, byte offset=0
9: #x00
2: #x00
8: #x00
5: #x08
4: null, byte offset=0
*: #x06
Block 2 > size: 0 align: 1 alloc type: 4 alive: true address: #x01
Source value: #x00000008 (8)
Target value: poison
Pass:
Command line: '/home/nlopes/llvm/build/bin/opt' '-load=/home/nlopes/alive2/build/tv/tv.so' '-tv-exit-on-error' '-tv' '-S' '-expand-memcmp' '-memcmp-num-loads-per-block=1' '-mtriple=x86_64-unknown-unknown' '-data-layout=e-m:o-i64:64-f80:128-n8:16:32:64-S128' '-tv' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
------------------- SMT STATS -------------------
Num queries: 31
Num invalid: 0
Num skips: 0
Num trivial: 7 (18.4%)
Num timeout: 0 (0.0%)
Num errors: 0 (0.0%)
Num SAT: 20 (64.5%)
Num UNSAT: 11 (35.5%)
Alive2: Transform doesn't verify; aborting!
Transforms/ExpandMemCmp/X86/bcmp.ll' FAILED ******************** Exit Code: 2 Command Output (stdout): -- # RUN: at line 2 /home/nlopes/alive2/build/opt-alive.sh -S -expand-memcmp -memcmp-num-loads-per-block=1 -mtriple=x86_64-unknown-unknown -data-layout=e-m:o-i64:64-f80:128-n8:16:32:64-S128 < /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandMemCmp/X86/bcmp.ll | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandMemCmp/X86/bcmp.ll --check-prefix=X64 # executed command: /home/nlopes/alive2/build/opt-alive.sh -S -expand-memcmp -memcmp-num-loads-per-block=1 -mtriple=x86_64-unknown-unknown -data-layout=e-m:o-i64:64-f80:128-n8:16:32:64-S128 # .---command stderr------------ # `----------------------------- # error: command failed with exit status: 1 # executed command: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandMemCmp/X86/bcmp.ll --check-prefix=X64 # .---command stderr------------ # | FileCheck error: '<stdin>' is empty. # | FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandMemCmp/X86/bcmp.ll --check-prefix=X64 # `----------------------------- # error: command failed with exit status: 2 --