Test Failure: Transforms/InstCombine/fabs.ll

Test source: git

Comments: LLVM PR59279

Log:

Source: <stdin>
-- 1. ModuleToFunctionPassAdaptor
ERROR: Unsupported instruction:   store volatile double %fpext, ptr undef, align 8
-- 1. PassManager<Function> : Skipping NOP
-- 2. InstCombinePass

----------------------------------------
define float @replace_fabs_call_f32(float %x) {
%0:
  %fabsf = fabs float %x, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 3. InstCombinePass

----------------------------------------
define float @replace_fabs_call_f32(float %x) {
%0:
  %fabsf = fabs float %x, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

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

----------------------------------------
define double @replace_fabs_call_f64(double %x) {
%0:
  %fabs = fabs double %x, exceptions=ignore
  ret double %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 7. InstCombinePass

----------------------------------------
define double @replace_fabs_call_f64(double %x) {
%0:
  %fabs = fabs double %x, exceptions=ignore
  ret double %fabs
}
Transformation seems to be correct! (syntactically equal)

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

----------------------------------------
define fp128 @replace_fabs_call_f128(fp128 %x) {
%0:
  %fabsl = call fp128 @fabsl(fp128 %x)
  ret fp128 %fabsl
}
Transformation seems to be correct! (syntactically equal)

-- 11. InstCombinePass

----------------------------------------
define fp128 @replace_fabs_call_f128(fp128 %x) {
%0:
  %fabsl = call fp128 @fabsl(fp128 %x)
  ret fp128 %fabsl
}
=>
define fp128 @replace_fabs_call_f128(fp128 %x) {
%0:
  %fabsl = fabs fp128 %x, exceptions=ignore
  ret fp128 %fabsl
}
Transformation doesn't verify! (not unsound)
ERROR: Couldn't prove the correctness of the transformation
Alive2 approximated the semantics of the programs and therefore we
cannot conclude whether the bug found is valid or not.

Approximations done:
 - Unknown libcall: @fabsl

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

----------------------------------------
define float @fmf_replace_fabs_call_f32(float %x) {
%0:
  %fabsf = fabs nnan float %x, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 15. InstCombinePass

----------------------------------------
define float @fmf_replace_fabs_call_f32(float %x) {
%0:
  %fabsf = fabs nnan float %x, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

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

----------------------------------------
define float @square_fabs_intrinsic_f32(float %x) {
%0:
  %mul = fmul float %x, %x, exceptions=ignore
  %fabsf = fabs float %mul, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 19. InstCombinePass

----------------------------------------
define float @square_fabs_intrinsic_f32(float %x) {
%0:
  %mul = fmul float %x, %x, exceptions=ignore
  %fabsf = fabs float %mul, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

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

----------------------------------------
define double @square_fabs_intrinsic_f64(double %x) {
%0:
  %mul = fmul double %x, %x, exceptions=ignore
  %fabs = fabs double %mul, exceptions=ignore
  ret double %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 23. InstCombinePass

----------------------------------------
define double @square_fabs_intrinsic_f64(double %x) {
%0:
  %mul = fmul double %x, %x, exceptions=ignore
  %fabs = fabs double %mul, exceptions=ignore
  ret double %fabs
}
Transformation seems to be correct! (syntactically equal)

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

----------------------------------------
define fp128 @square_fabs_intrinsic_f128(fp128 %x) {
%0:
  %mul = fmul fp128 %x, %x, exceptions=ignore
  %fabsl = fabs fp128 %mul, exceptions=ignore
  ret fp128 %fabsl
}
Transformation seems to be correct! (syntactically equal)

-- 27. InstCombinePass

----------------------------------------
define fp128 @square_fabs_intrinsic_f128(fp128 %x) {
%0:
  %mul = fmul fp128 %x, %x, exceptions=ignore
  %fabsl = fabs fp128 %mul, exceptions=ignore
  ret fp128 %fabsl
}
Transformation seems to be correct! (syntactically equal)

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

----------------------------------------
define float @square_nnan_fabs_intrinsic_f32(float %x) {
%0:
  %mul = fmul nnan float %x, %x, exceptions=ignore
  %fabsf = fabs float %mul, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 31. InstCombinePass

----------------------------------------
define float @square_nnan_fabs_intrinsic_f32(float %x) {
%0:
  %mul = fmul nnan float %x, %x, exceptions=ignore
  %fabsf = fabs float %mul, exceptions=ignore
  ret float %fabsf
}
=>
define float @square_nnan_fabs_intrinsic_f32(float %x) {
%0:
  %mul = fmul nnan float %x, %x, exceptions=ignore
  ret float %mul
}
Transformation seems to be correct!

-- 32. PassManager<Function> : Skipping NOP
-- 33. PassManager<Function> : Skipping NOP
-- 34. InstCombinePass

----------------------------------------
define float @square_fabs_shrink_call1(float %x) {
%0:
  %ext = fpext float %x to double, exceptions=ignore
  %sq = fmul double %ext, %ext, exceptions=ignore
  %fabs = fabs double %sq, exceptions=ignore
  %trunc = fptrunc double %fabs to float, exceptions=ignore
  ret float %trunc
}
Transformation seems to be correct! (syntactically equal)

-- 35. InstCombinePass

----------------------------------------
define float @square_fabs_shrink_call1(float %x) {
%0:
  %ext = fpext float %x to double, exceptions=ignore
  %sq = fmul double %ext, %ext, exceptions=ignore
  %fabs = fabs double %sq, exceptions=ignore
  %trunc = fptrunc double %fabs to float, exceptions=ignore
  ret float %trunc
}
=>
define float @square_fabs_shrink_call1(float %x) {
%0:
  %1 = fmul float %x, %x, exceptions=ignore
  %trunc = fabs float %1, exceptions=ignore
  ret float %trunc
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout
-- 36. PassManager<Function> : Skipping NOP
-- 37. PassManager<Function> : Skipping NOP
-- 38. InstCombinePass

----------------------------------------
define float @square_fabs_shrink_call2(float %x) {
%0:
  %sq = fmul float %x, %x, exceptions=ignore
  %ext = fpext float %sq to double, exceptions=ignore
  %fabs = fabs double %ext, exceptions=ignore
  %trunc = fptrunc double %fabs to float, exceptions=ignore
  ret float %trunc
}
Transformation seems to be correct! (syntactically equal)

-- 39. InstCombinePass

----------------------------------------
define float @square_fabs_shrink_call2(float %x) {
%0:
  %sq = fmul float %x, %x, exceptions=ignore
  %ext = fpext float %sq to double, exceptions=ignore
  %fabs = fabs double %ext, exceptions=ignore
  %trunc = fptrunc double %fabs to float, exceptions=ignore
  ret float %trunc
}
=>
define float @square_fabs_shrink_call2(float %x) {
%0:
  %sq = fmul float %x, %x, exceptions=ignore
  %1 = fabs float %sq, exceptions=ignore
  ret float %1
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout
-- 40. PassManager<Function> : Skipping NOP
-- 41. PassManager<Function> : Skipping NOP
-- 42. InstCombinePass

----------------------------------------
define float @fabs_select_constant_negative_positive(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float -1.000000, float 2.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 43. InstCombinePass

----------------------------------------
define float @fabs_select_constant_negative_positive(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float -1.000000, float 2.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
=>
define float @fabs_select_constant_negative_positive(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %fabs = select i1 %cmp, float 1.000000, float 2.000000
  ret float %fabs
}
Transformation seems to be correct!

-- 44. PassManager<Function> : Skipping NOP
-- 45. PassManager<Function> : Skipping NOP
-- 46. InstCombinePass

----------------------------------------
define float @fabs_select_constant_positive_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float 1.000000, float -2.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 47. InstCombinePass

----------------------------------------
define float @fabs_select_constant_positive_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float 1.000000, float -2.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
=>
define float @fabs_select_constant_positive_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %fabs = select i1 %cmp, float 1.000000, float 2.000000
  ret float %fabs
}
Transformation seems to be correct!

-- 48. PassManager<Function> : Skipping NOP
-- 49. PassManager<Function> : Skipping NOP
-- 50. InstCombinePass

----------------------------------------
define float @fabs_select_constant_negative_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float -1.000000, float -2.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 51. InstCombinePass

----------------------------------------
define float @fabs_select_constant_negative_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float -1.000000, float -2.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
=>
define float @fabs_select_constant_negative_negative(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %fabs = select i1 %cmp, float 1.000000, float 2.000000
  ret float %fabs
}
Transformation seems to be correct!

-- 52. PassManager<Function> : Skipping NOP
-- 53. PassManager<Function> : Skipping NOP
-- 54. InstCombinePass

----------------------------------------
define float @fabs_select_constant_neg0(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float -0.000000, float 0.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 55. InstCombinePass

----------------------------------------
define float @fabs_select_constant_neg0(i32 %c) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float -0.000000, float 0.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
=>
define float @fabs_select_constant_neg0(i32 %c) {
%0:
  ret float 0.000000
}
Transformation seems to be correct!

-- 56. PassManager<Function> : Skipping NOP
-- 57. PassManager<Function> : Skipping NOP
-- 58. InstCombinePass

----------------------------------------
define float @fabs_select_var_constant_negative(i32 %c, float %x) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float %x, float -1.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 59. InstCombinePass

----------------------------------------
define float @fabs_select_var_constant_negative(i32 %c, float %x) {
%0:
  %cmp = icmp eq i32 %c, 0
  %select = select i1 %cmp, float %x, float -1.000000
  %fabs = fabs float %select, exceptions=ignore
  ret float %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 60. PassManager<Function> : Skipping NOP
-- 61. PassManager<Function> : Skipping NOP
-- 62. InstCombinePass

----------------------------------------
define float @square_fma_fabs_intrinsic_f32(float %x) {
%0:
  %fma = fma float %x, float %x, float 1.000000, exceptions=ignore
  %fabsf = fabs float %fma, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 63. InstCombinePass

----------------------------------------
define float @square_fma_fabs_intrinsic_f32(float %x) {
%0:
  %fma = fma float %x, float %x, float 1.000000, exceptions=ignore
  %fabsf = fabs float %fma, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 64. PassManager<Function> : Skipping NOP
-- 65. PassManager<Function> : Skipping NOP
-- 66. InstCombinePass

----------------------------------------
define float @square_nnan_fma_fabs_intrinsic_f32(float %x) {
%0:
  %fma = fma nnan float %x, float %x, float 1.000000, exceptions=ignore
  %fabsf = fabs float %fma, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 67. InstCombinePass

----------------------------------------
define float @square_nnan_fma_fabs_intrinsic_f32(float %x) {
%0:
  %fma = fma nnan float %x, float %x, float 1.000000, exceptions=ignore
  %fabsf = fabs float %fma, exceptions=ignore
  ret float %fabsf
}
=>
define float @square_nnan_fma_fabs_intrinsic_f32(float %x) {
%0:
  %fma = fma nnan float %x, float %x, float 1.000000, exceptions=ignore
  ret float %fma
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout
-- 68. PassManager<Function> : Skipping NOP
-- 69. PassManager<Function> : Skipping NOP
-- 70. InstCombinePass

----------------------------------------
define float @square_fmuladd_fabs_intrinsic_f32(float %x) {
%0:
  %fmuladd = fmuladd float %x, float %x, float 1.000000, exceptions=ignore
  %fabsf = fabs float %fmuladd, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 71. InstCombinePass

----------------------------------------
define float @square_fmuladd_fabs_intrinsic_f32(float %x) {
%0:
  %fmuladd = fmuladd float %x, float %x, float 1.000000, exceptions=ignore
  %fabsf = fabs float %fmuladd, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 72. PassManager<Function> : Skipping NOP
-- 73. PassManager<Function> : Skipping NOP
-- 74. InstCombinePass

----------------------------------------
define float @square_nnan_fmuladd_fabs_intrinsic_f32(float %x) {
%0:
  %fmuladd = fmuladd nnan float %x, float %x, float 1.000000, exceptions=ignore
  %fabsf = fabs float %fmuladd, exceptions=ignore
  ret float %fabsf
}
Transformation seems to be correct! (syntactically equal)

-- 75. InstCombinePass

----------------------------------------
define float @square_nnan_fmuladd_fabs_intrinsic_f32(float %x) {
%0:
  %fmuladd = fmuladd nnan float %x, float %x, float 1.000000, exceptions=ignore
  %fabsf = fabs float %fmuladd, exceptions=ignore
  ret float %fabsf
}
=>
define float @square_nnan_fmuladd_fabs_intrinsic_f32(float %x) {
%0:
  %fmuladd = fmuladd nnan float %x, float %x, float 1.000000, exceptions=ignore
  ret float %fmuladd
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout
-- 76. PassManager<Function> : Skipping NOP
-- 77. PassManager<Function> : Skipping NOP
ERROR: Unsupported instruction:   store volatile double %fpext, ptr undef, align 8
-- 78. InstCombinePass
ERROR: Unsupported instruction:   store volatile double %fpext, ptr undef, align 8
-- 79. InstCombinePass
ERROR: Unsupported instruction:   store volatile double %fpext, ptr undef, align 8
-- 80. PassManager<Function> : Skipping NOP
ERROR: Unsupported instruction:   store volatile double %fpext, ptr undef, align 8
-- 81. PassManager<Function> : Skipping NOP
-- 82. InstCombinePass

----------------------------------------
define double @select_fcmp_ole_zero(double %x) {
%0:
  %lezero = fcmp ole double %x, 0.000000
  %negx = fsub double 0.000000, %x, exceptions=ignore
  %fabs = select i1 %lezero, double %negx, double %x
  ret double %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 83. InstCombinePass

----------------------------------------
define double @select_fcmp_ole_zero(double %x) {
%0:
  %lezero = fcmp ole double %x, 0.000000
  %negx = fsub double 0.000000, %x, exceptions=ignore
  %fabs = select i1 %lezero, double %negx, double %x
  ret double %fabs
}
=>
define double @select_fcmp_ole_zero(double %x) {
%0:
  %1 = fabs double %x, exceptions=ignore
  ret double %1
}
Transformation doesn't verify! (not unsound)
ERROR: Timeout
-- 84. PassManager<Function> : Skipping NOP
-- 85. PassManager<Function> : Skipping NOP
-- 86. InstCombinePass

----------------------------------------
define double @select_fcmp_nnan_ole_zero(double %x) {
%0:
  %lezero = fcmp ole double %x, 0.000000
  %negx = fsub nnan double 0.000000, %x, exceptions=ignore
  %fabs = select i1 %lezero, double %negx, double %x
  ret double %fabs
}
Transformation seems to be correct! (syntactically equal)

-- 87. InstCombinePass

----------------------------------------
define double @select_fcmp_nnan_ole_zero(double %x) {
%0:
  %lezero = fcmp ole double %x, 0.000000
  %negx = fsub nnan double 0.000000, %x, exceptions=ignore
  %fabs = select i1 %lezero, double %negx, double %x
  ret double %fabs
}
=>
define double @select_fcmp_nnan_ole_zero(double %x) {
%0:
  %1 = fabs double %x, exceptions=ignore
  ret double %1
}
Transformation doesn't verify! (unsound)
ERROR: Value mismatch

Example:
double %x = #xfff0000000040000 (QNaN)

Source:
i1 %lezero = #x0 (0)
double %negx = poison
double %fabs = #xfff0000000040000 (QNaN)

Target:
double %1 = #x7ff0000000040000 (QNaN)
Source value: #xfff0000000040000 (QNaN)
Target value: #x7ff0000000040000 (QNaN)

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' '-mtriple=x86_64-unknown-linux-gnu' '-passes=instcombine' '-S' '-tv-smt-to=20000' '-tv-report-dir=/home/nlopes/alive2/build/logs' '-tv-smt-stats'


------------------- SMT STATS -------------------
Num queries: 55
Num invalid: 0
Num skips:   0
Num trivial: 43 (43.9%)
Num timeout: 5 (9.1%)
Num errors:  0 (0.0%)
Num SAT:     38 (69.1%)
Num UNSAT:   12 (21.8%)
Alive2: Transform doesn't verify; aborting!

stderr:

+ : 'RUN: at line 2'
+ /home/nlopes/alive2/build/opt-alive.sh -mtriple=x86_64-unknown-linux-gnu -passes=instcombine -S
+ /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/fabs.ll

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

 

<-- Back