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=#x10 ptr nocapture nowrite %y = pointer(non-local, block_id=1, offset=6, attrs=3) / Address=#x10 Source: i32 %call = #x00000000 (0) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 1 alloc type: 0 alive: false address: 0 Block 1 > size: 15 align: 1 alloc type: 0 alive: true address: 10 Contents: 6: null, byte offset=0 7: #x00 11: #x00 9: #x01 10: #x00 8: null, byte offset=0 13: #x00 12: #x00 *: #x06 Block 2 > size: 0 align: 1 alloc type: 0 alive: true address: 4 Target: i64 %#1 = poison i64 %#2 = poison i1 %#3 = poison i32 %#4 = poison Source value: #x00000000 (0) 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: 29 Num invalid: 0 Num skips: 0 Num trivial: 5 (14.7%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 17 (58.6%) Num UNSAT: 12 (41.4%) Alive2: Transform doesn't verify; aborting!
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 + /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/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/ExpandMemCmp/X86/bcmp.ll --check-prefix=X64 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