Test Failure: Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.ll

Test source: git

Log:

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

----------------------------------------
define i4 @scalar(i4 %x, i4 %y, i4 %m) {
#0:
  %im = xor i4 %m, 15
  %n0 = xor i4 %x, %y
  %n1 = and i4 %n0, %im
  %r = xor i4 %n1, %y
  ret i4 %r
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
define i4 @scalar(i4 %x, i4 %y, i4 %m) {
#0:
  %im = xor i4 %m, 15
  %n0 = xor i4 %x, %y
  %n1 = and i4 %n0, %im
  %r = xor i4 %n1, %y
  ret i4 %r
}
=>
define i4 @scalar(i4 %x, i4 %y, i4 %m) {
#0:
  %n0 = xor i4 %x, %y
  %#1 = and i4 %n0, %m
  %r = xor i4 %#1, %x
  ret i4 %r
}
Transformation doesn't verify! (unsound)
ERROR: Target's return value is more undefined

Example:
i4 %x = undef
i4 %y = #x0 (0)
i4 %m = #xf (15, -1)

Source:
i4 %im = #x0 (0)
i4 %n0 = #x3 (3)	[based on undef]
i4 %n1 = #x0 (0)
i4 %r = #x0 (0)

Target:
i4 %n0 = #x0 (0)
i4 %#1 = #x0 (0)
i4 %r = #xf (15, -1)
Source value: #x0 (0)
Target value: #xf (15, -1)

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_CdgPzSKL_R51S.bc"

------------------- SMT STATS -------------------
Num queries: 19
Num invalid: 0
Num skips:   0
Num trivial: 14 (42.4%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     15 (78.9%)
Num UNSAT:   4 (21.1%)
Alive2: Transform doesn't verify; aborting!

stderr:

Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.ll' FAILED ********************
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 2
/home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.ll
# executed command: /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S
# .---command stderr------------
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.ll
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.ll
# `-----------------------------
# error: command failed with exit status: 2

--

 

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

 

<-- Back