Test source: git
Comments: LLVM bug: load widening of i8 -> i16
Source: <stdin> ---------------------------------------- define i32 @cmp2(* nocapture readonly %x, * nocapture readonly %y) { %0: %call = memcmp * nocapture readonly %x, * nocapture readonly %y, i64 2 ret i32 %call } => define i32 @cmp2(* nocapture readonly %x, * nocapture readonly %y) { %0: %1 = bitcast * nocapture readonly %x to * %2 = bitcast * nocapture readonly %y to * %3 = load i16, * %1, align 1 %4 = load i16, * %2, align 1 %5 = bswap i16 %3 %6 = bswap i16 %4 %7 = zext i16 %5 to i32 %8 = zext i16 %6 to i32 %9 = sub i32 %7, %8 ret i32 %9 } Transformation doesn't verify! ERROR: Target is more poisonous than source Example: * nocapture readonly %x = pointer(non-local, block_id=1, offset=0, attrs=3) * nocapture readonly %y = pointer(non-local, block_id=2, offset=0, attrs=3) Source: i32 %call = #x80000000 (2147483648, -2147483648) SOURCE MEMORY STATE =================== NON-LOCAL BLOCKS: Block 0 > size: 0 align: 32 alloc type: 0 Block 1 > size: 2 align: 2 alloc type: 0 Block 2 > size: 4 align: 2 alloc type: 0 Target: * %1 = pointer(non-local, block_id=1, offset=0, attrs=3) * %2 = pointer(non-local, block_id=2, offset=0, attrs=3) i16 %3 = #x0000 (0) i16 %4 = poison i16 %5 = #x0000 (0) i16 %6 = poison i32 %7 = #x00000000 (0) i32 %8 = poison i32 %9 = poison Source value: #x80000000 (2147483648, -2147483648) Target value: poison ------------------- SMT STATS ------------------- Num queries: 5 Num invalid: 0 Num skips: 0 Num trivial: 0 (0.0%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 3 (60.0%) Num UNSAT: 2 (40.0%)
+ : 'RUN: at line 2' + /home/nlopes/alive2/scripts/opt-alive.sh -S -expandmemcmp -mtriple=i686-unknown-unknown -data-layout=e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128 + /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/ExpandMemCmp/X86/memcmp.ll --check-prefix=ALL --check-prefix=X32 Alive2: Transform doesn't verify; aborting! FileCheck error: '<stdin>' is empty. FileCheck command line: /home/nlopes/llvm/build/bin/FileCheck /home/nlopes/llvm/llvm/test/Transforms/ExpandMemCmp/X86/memcmp.ll --check-prefix=ALL --check-prefix=X32