Test Failure: Transforms/InstCombine/insertelt-trunc.ll

Test source: git

Log:

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

----------------------------------------
define <4 x i16> @insert_01_poison_v4i16(i32 %x) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <4 x i16> poison, i16 %lo16, i64 0
  %ins1 = insertelement <4 x i16> %ins0, i16 %hi16, i64 1
  ret <4 x i16> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
define <4 x i16> @insert_01_poison_v4i16(i32 %x) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <4 x i16> poison, i16 %lo16, i64 0
  %ins1 = insertelement <4 x i16> %ins0, i16 %hi16, i64 1
  ret <4 x i16> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 4. PassManager<Function> : Skipping NOP
-- 5. PassManager<Function> : Skipping NOP
-- 6. InstCombinePass

----------------------------------------
define <8 x i16> @insert_10_poison_v8i16(i32 %x) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <8 x i16> poison, i16 %lo16, i64 1
  %ins1 = insertelement <8 x i16> %ins0, i16 %hi16, i64 0
  ret <8 x i16> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 7. InstCombinePass

----------------------------------------
define <8 x i16> @insert_10_poison_v8i16(i32 %x) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <8 x i16> poison, i16 %lo16, i64 1
  %ins1 = insertelement <8 x i16> %ins0, i16 %hi16, i64 0
  ret <8 x i16> %ins1
}
=>
define <8 x i16> @insert_10_poison_v8i16(i32 %x) {
%0:
  %1 = insertelement <4 x i32> poison, i32 %x, i64 0
  %ins1 = bitcast <4 x i32> %1 to <8 x i16>
  ret <8 x i16> %ins1
}
Transformation seems to be correct!

-- 8. PassManager<Function> : Skipping NOP
-- 9. PassManager<Function> : Skipping NOP
-- 10. InstCombinePass

----------------------------------------
define <4 x i32> @insert_12_poison_v4i32(i64 %x) {
%0:
  %hi64 = lshr i64 %x, 32
  %hi32 = trunc i64 %hi64 to i32
  %lo32 = trunc i64 %x to i32
  %ins0 = insertelement <4 x i32> poison, i32 %lo32, i64 1
  %ins1 = insertelement <4 x i32> %ins0, i32 %hi32, i64 2
  ret <4 x i32> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 11. InstCombinePass

----------------------------------------
define <4 x i32> @insert_12_poison_v4i32(i64 %x) {
%0:
  %hi64 = lshr i64 %x, 32
  %hi32 = trunc i64 %hi64 to i32
  %lo32 = trunc i64 %x to i32
  %ins0 = insertelement <4 x i32> poison, i32 %lo32, i64 1
  %ins1 = insertelement <4 x i32> %ins0, i32 %hi32, i64 2
  ret <4 x i32> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 12. PassManager<Function> : Skipping NOP
-- 13. PassManager<Function> : Skipping NOP
-- 14. InstCombinePass

----------------------------------------
define <4 x i16> @insert_21_poison_v4i16(i32 %x) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <4 x i16> poison, i16 %lo16, i64 2
  %ins1 = insertelement <4 x i16> %ins0, i16 %hi16, i64 1
  ret <4 x i16> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 15. InstCombinePass

----------------------------------------
define <4 x i16> @insert_21_poison_v4i16(i32 %x) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <4 x i16> poison, i16 %lo16, i64 2
  %ins1 = insertelement <4 x i16> %ins0, i16 %hi16, i64 1
  ret <4 x i16> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 16. PassManager<Function> : Skipping NOP
-- 17. PassManager<Function> : Skipping NOP
-- 18. InstCombinePass

----------------------------------------
define <4 x i32> @insert_23_poison_v4i32(i64 %x) {
%0:
  %hi64 = lshr i64 %x, 32
  %hi32 = trunc i64 %hi64 to i32
  %lo32 = trunc i64 %x to i32
  %ins0 = insertelement <4 x i32> poison, i32 %lo32, i64 2
  %ins1 = insertelement <4 x i32> %ins0, i32 %hi32, i64 3
  ret <4 x i32> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 19. InstCombinePass

----------------------------------------
define <4 x i32> @insert_23_poison_v4i32(i64 %x) {
%0:
  %hi64 = lshr i64 %x, 32
  %hi32 = trunc i64 %hi64 to i32
  %lo32 = trunc i64 %x to i32
  %ins0 = insertelement <4 x i32> poison, i32 %lo32, i64 2
  %ins1 = insertelement <4 x i32> %ins0, i32 %hi32, i64 3
  ret <4 x i32> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 20. PassManager<Function> : Skipping NOP
-- 21. PassManager<Function> : Skipping NOP
-- 22. InstCombinePass

----------------------------------------
define <4 x i16> @insert_32_poison_v4i16(i32 %x) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <4 x i16> poison, i16 %lo16, i64 3
  %ins1 = insertelement <4 x i16> %ins0, i16 %hi16, i64 2
  ret <4 x i16> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 23. InstCombinePass

----------------------------------------
define <4 x i16> @insert_32_poison_v4i16(i32 %x) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <4 x i16> poison, i16 %lo16, i64 3
  %ins1 = insertelement <4 x i16> %ins0, i16 %hi16, i64 2
  ret <4 x i16> %ins1
}
=>
define <4 x i16> @insert_32_poison_v4i16(i32 %x) {
%0:
  %1 = insertelement <2 x i32> poison, i32 %x, i64 1
  %ins1 = bitcast <2 x i32> %1 to <4 x i16>
  ret <4 x i16> %ins1
}
Transformation seems to be correct!

-- 24. PassManager<Function> : Skipping NOP
-- 25. PassManager<Function> : Skipping NOP
-- 26. InstCombinePass

----------------------------------------
define <2 x i16> @insert_01_v2i16(i32 %x, <2 x i16> %v) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <2 x i16> %v, i16 %lo16, i64 0
  %ins1 = insertelement <2 x i16> %ins0, i16 %hi16, i64 1
  ret <2 x i16> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 27. InstCombinePass

----------------------------------------
define <2 x i16> @insert_01_v2i16(i32 %x, <2 x i16> %v) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <2 x i16> %v, i16 %lo16, i64 0
  %ins1 = insertelement <2 x i16> %ins0, i16 %hi16, i64 1
  ret <2 x i16> %ins1
}
=>
define <2 x i16> @insert_01_v2i16(i32 %x, <2 x i16> %v) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <2 x i16> poison, i16 %lo16, i64 0
  %ins1 = insertelement <2 x i16> %ins0, i16 %hi16, i64 1
  ret <2 x i16> %ins1
}
Transformation seems to be correct!

-- 28. PassManager<Function> : Skipping NOP
-- 29. PassManager<Function> : Skipping NOP
-- 30. InstCombinePass

----------------------------------------
define <8 x i16> @insert_10_v8i16(i32 %x, <8 x i16> %v) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <8 x i16> %v, i16 %lo16, i64 1
  %ins1 = insertelement <8 x i16> %ins0, i16 %hi16, i64 0
  ret <8 x i16> %ins1
}
Transformation seems to be correct! (syntactically equal)

-- 31. InstCombinePass

----------------------------------------
define <8 x i16> @insert_10_v8i16(i32 %x, <8 x i16> %v) {
%0:
  %hi32 = lshr i32 %x, 16
  %hi16 = trunc i32 %hi32 to i16
  %lo16 = trunc i32 %x to i16
  %ins0 = insertelement <8 x i16> %v, i16 %lo16, i64 1
  %ins1 = insertelement <8 x i16> %ins0, i16 %hi16, i64 0
  ret <8 x i16> %ins1
}
=>
define <8 x i16> @insert_10_v8i16(i32 %x, <8 x i16> %v) {
%0:
  %1 = bitcast <8 x i16> %v to <4 x i32>
  %2 = insertelement <4 x i32> %1, i32 %x, i64 0
  %ins1 = bitcast <4 x i32> %2 to <8 x i16>
  ret <8 x i16> %ins1
}
Transformation doesn't verify! (unsound)
ERROR: Target is more poisonous than source

Example:
i32 %x = poison
<8 x i16> %v = < poison, poison, poison, poison, #x0000 (0)	[based on undef value], #x0000 (0)	[based on undef value], #x0000 (0)	[based on undef value], poison >

Source:
i32 %hi32 = poison
i16 %hi16 = poison
i16 %lo16 = poison
<8 x i16> %ins0 = < poison, poison, poison, poison, #x0000 (0), #x0000 (0), #x0000 (0), poison >
<8 x i16> %ins1 = < poison, poison, poison, poison, #x0000 (0), #x0000 (0), #x0000 (0), poison >

Target:
<4 x i32> %1 = < poison, poison, #x00000000 (0), poison >
<4 x i32> %2 = < poison, poison, #x00000000 (0), poison >
<8 x i16> %ins1 = < poison, poison, poison, poison, #x0000 (0), #x0000 (0), poison, poison >
Source value: < poison, poison, poison, poison, #x0000 (0), #x0000 (0), #x0000 (0), poison >
Target value: < poison, poison, poison, poison, #x0000 (0), #x0000 (0), poison, 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' '-data-layout=E' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'


------------------- SMT STATS -------------------
Num queries: 40
Num invalid: 0
Num skips:   0
Num trivial: 29 (42.0%)
Num timeout: 0 (0.0%)
Num errors:  0 (0.0%)
Num SAT:     31 (77.5%)
Num UNSAT:   9 (22.5%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S -data-layout=E
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/insertelt-trunc.ll --check-prefixes=ALL,BE

FileCheck error: '<stdin>' is empty.
FileCheck command line:  /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/insertelt-trunc.ll --check-prefixes=ALL,BE

 

<-- Back