Test Failure: Transforms/InstCombine/masked-merge-xor.ll

Test source: git

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
-- 1. PassManager<Function> : Skipping NOP
-- 2. InstCombinePass

----------------------------------------
define i32 @p(i32 %x, i32 %y, i32 %m) {
#0:
  %and = and i32 %x, %m
  %neg = xor i32 %m, 4294967295
  %and1 = and i32 %neg, %y
  %ret = xor i32 %and, %and1
  ret i32 %ret
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
define i32 @p(i32 %x, i32 %y, i32 %m) {
#0:
  %and = and i32 %x, %m
  %neg = xor i32 %m, 4294967295
  %and1 = and i32 %neg, %y
  %ret = xor i32 %and, %and1
  ret i32 %ret
}
=>
define i32 @p(i32 %x, i32 %y, i32 %m) {
#0:
  %and = and i32 %x, %m
  %neg = xor i32 %m, 4294967295
  %and1 = and i32 %neg, %y
  %ret = or disjoint i32 %and, %and1
  ret i32 %ret
}
Transformation doesn't verify! (unsound)
ERROR: Target is more poisonous than source

Example:
i32 %x = #x0000000f (15)
i32 %y = undef
i32 %m = undef

Source:
i32 %and = #x00000000 (0)	[based on undef value]
i32 %neg = #xffffffff (4294967295, -1)	[based on undef value]
i32 %and1 = #x00000000 (0)	[based on undef value]
i32 %ret = #x00000000 (0)

Target:
i32 %and = #x0000000f (15)
i32 %neg = #xffffffff (4294967295, -1)
i32 %and1 = #x0000000f (15)
i32 %ret = poison
Source value: #x00000000 (0)
Target value: poison

Pass: InstCombinePass
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' '-passes=instcombine' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'
Wrote bitcode to: "/home/nlopes/alive2/build/logs/in_A4IxoDxR_xg0R.bc"


------------------- SMT STATS -------------------
Num queries: 19
Num invalid: 0
Num skips:   0
Num trivial: 13 (40.6%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     14 (73.7%)
Num UNSAT:   5 (26.3%)
Alive2: Transform doesn't verify; aborting!

stderr:

RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/masked-merge-xor.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/masked-merge-xor.ll
+ /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/masked-merge-xor.ll

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/masked-merge-xor.ll

 

NOTE: This test would pass if undef didn't exist!

 

<-- Back