Test source: git
Source: <stdin> -- 1. ModuleToFunctionPassAdaptor -- 1. PassManager<Function> : Skipping NOP -- 2. InstCombinePass ---------------------------------------- declare void @use(i1) define double @oeq(double %x) { #0: %cmp = fcmp oeq double %x, 42.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double %x, double 42.000000 ret double %cond } Transformation seems to be correct! (syntactically equal) -- 3. InstCombinePass ---------------------------------------- declare void @use(i1) define double @oeq(double %x) { #0: %cmp = fcmp oeq double %x, 42.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double %x, double 42.000000 ret double %cond } => declare void @use(i1) define double @oeq(double %x) { #0: %cmp = fcmp oeq double %x, 42.000000 call void @use(i1 %cmp) ret double 42.000000 } Transformation seems to be correct! -- 4. PassManager<Function> : Skipping NOP -- 5. PassManager<Function> : Skipping NOP -- 6. InstCombinePass ---------------------------------------- declare void @use(i1) define float @oeq_swapped(float %x) { #0: %cmp = fcmp oeq float %x, 42.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, float 42.000000, float %x ret float %cond } Transformation seems to be correct! (syntactically equal) -- 7. InstCombinePass ---------------------------------------- declare void @use(i1) define float @oeq_swapped(float %x) { #0: %cmp = fcmp oeq float %x, 42.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, float 42.000000, float %x ret float %cond } => declare void @use(i1) define float @oeq_swapped(float %x) { #0: %cmp = fcmp oeq float %x, 42.000000 call void @use(i1 %cmp) ret float %x } Transformation seems to be correct! -- 8. PassManager<Function> : Skipping NOP -- 9. PassManager<Function> : Skipping NOP -- 10. InstCombinePass ---------------------------------------- declare void @use(i1) define double @une(double %x) { #0: %cmp = fcmp une double %x, 42.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double %x, double 42.000000 ret double %cond } Transformation seems to be correct! (syntactically equal) -- 11. InstCombinePass ---------------------------------------- declare void @use(i1) define double @une(double %x) { #0: %cmp = fcmp une double %x, 42.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double %x, double 42.000000 ret double %cond } => declare void @use(i1) define double @une(double %x) { #0: %cmp = fcmp une double %x, 42.000000 call void @use(i1 %cmp) ret double %x } Transformation seems to be correct! -- 12. PassManager<Function> : Skipping NOP -- 13. PassManager<Function> : Skipping NOP -- 14. InstCombinePass ---------------------------------------- declare void @use(i1) define double @une_swapped(double %x) { #0: %cmp = fcmp une double %x, 42.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double 42.000000, double %x ret double %cond } Transformation seems to be correct! (syntactically equal) -- 15. InstCombinePass ---------------------------------------- declare void @use(i1) define double @une_swapped(double %x) { #0: %cmp = fcmp une double %x, 42.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double 42.000000, double %x ret double %cond } => declare void @use(i1) define double @une_swapped(double %x) { #0: %cmp = fcmp une double %x, 42.000000 call void @use(i1 %cmp) ret double 42.000000 } Transformation seems to be correct! -- 16. PassManager<Function> : Skipping NOP -- 17. PassManager<Function> : Skipping NOP -- 18. InstCombinePass ---------------------------------------- declare void @use(i1) define double @une_could_be_negzero(double %x, double %y) { #0: %cmp = fcmp une double %x, %y call void @use(i1 %cmp) %cond = select i1 %cmp, double %x, double %y ret double %cond } Transformation seems to be correct! (syntactically equal) -- 19. InstCombinePass ---------------------------------------- declare void @use(i1) define double @une_could_be_negzero(double %x, double %y) { #0: %cmp = fcmp une double %x, %y call void @use(i1 %cmp) %cond = select i1 %cmp, double %x, double %y ret double %cond } Transformation seems to be correct! (syntactically equal) -- 20. PassManager<Function> : Skipping NOP -- 21. PassManager<Function> : Skipping NOP -- 22. InstCombinePass ---------------------------------------- declare void @use(i1) define double @une_swapped_could_be_negzero(double %x, double %y) { #0: %cmp = fcmp une double %x, %y call void @use(i1 %cmp) %cond = select i1 %cmp, double %y, double %x ret double %cond } Transformation seems to be correct! (syntactically equal) -- 23. InstCombinePass ---------------------------------------- declare void @use(i1) define double @une_swapped_could_be_negzero(double %x, double %y) { #0: %cmp = fcmp une double %x, %y call void @use(i1 %cmp) %cond = select i1 %cmp, double %y, double %x ret double %cond } Transformation seems to be correct! (syntactically equal) -- 24. PassManager<Function> : Skipping NOP -- 25. PassManager<Function> : Skipping NOP -- 26. InstCombinePass ---------------------------------------- declare void @use(i1) define double @one(double %x) { #0: %cmp = fcmp one double %x, -1.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double %x, double -1.000000 ret double %cond } Transformation seems to be correct! (syntactically equal) -- 27. InstCombinePass ---------------------------------------- declare void @use(i1) define double @one(double %x) { #0: %cmp = fcmp one double %x, -1.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double %x, double -1.000000 ret double %cond } Transformation seems to be correct! (syntactically equal) -- 28. PassManager<Function> : Skipping NOP -- 29. PassManager<Function> : Skipping NOP -- 30. InstCombinePass ---------------------------------------- declare void @use(i1) define double @one_swapped(double %x) { #0: %cmp = fcmp one double %x, -1.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double -1.000000, double %x ret double %cond } Transformation seems to be correct! (syntactically equal) -- 31. InstCombinePass ---------------------------------------- declare void @use(i1) define double @one_swapped(double %x) { #0: %cmp = fcmp one double %x, -1.000000 call void @use(i1 %cmp) %cond = select i1 %cmp, double -1.000000, double %x ret double %cond } Transformation seems to be correct! (syntactically equal) -- 32. PassManager<Function> : Skipping NOP -- 33. PassManager<Function> : Skipping NOP -- 34. InstCombinePass ---------------------------------------- define i1 @fcmp_oeq_select(i1 %cond, float %a, float %b) { #0: %lhs = select i1 %cond, float %a, float %b %rhs = select i1 %cond, float %b, float %a %res = fcmp oeq float %lhs, %rhs ret i1 %res } Transformation seems to be correct! (syntactically equal) -- 35. InstCombinePass ---------------------------------------- define i1 @fcmp_oeq_select(i1 %cond, float %a, float %b) { #0: %lhs = select i1 %cond, float %a, float %b %rhs = select i1 %cond, float %b, float %a %res = fcmp oeq float %lhs, %rhs ret i1 %res } => define i1 @fcmp_oeq_select(i1 %cond, float %a, float %b) { #0: %res = fcmp oeq float %a, %b ret i1 %res } Transformation seems to be correct! -- 36. PassManager<Function> : Skipping NOP -- 37. PassManager<Function> : Skipping NOP -- 38. InstCombinePass ---------------------------------------- define i1 @fcmp_uno_select(i1 %cond, float %a, float %b) { #0: %lhs = select i1 %cond, float %a, float %b %rhs = select i1 %cond, float %b, float %a %res = fcmp uno float %lhs, %rhs ret i1 %res } Transformation seems to be correct! (syntactically equal) -- 39. InstCombinePass ---------------------------------------- define i1 @fcmp_uno_select(i1 %cond, float %a, float %b) { #0: %lhs = select i1 %cond, float %a, float %b %rhs = select i1 %cond, float %b, float %a %res = fcmp uno float %lhs, %rhs ret i1 %res } => define i1 @fcmp_uno_select(i1 %cond, float %a, float %b) { #0: %res = fcmp uno float %a, %b ret i1 %res } Transformation seems to be correct! -- 40. PassManager<Function> : Skipping NOP -- 41. PassManager<Function> : Skipping NOP -- 42. InstCombinePass ---------------------------------------- define i1 @fcmp_ogt_select(i1 %cond, float %a, float %b) { #0: %lhs = select i1 %cond, float %a, float %b %rhs = select i1 %cond, float %b, float %a %res = fcmp ogt float %lhs, %rhs ret i1 %res } Transformation seems to be correct! (syntactically equal) -- 43. InstCombinePass ---------------------------------------- define i1 @fcmp_ogt_select(i1 %cond, float %a, float %b) { #0: %lhs = select i1 %cond, float %a, float %b %rhs = select i1 %cond, float %b, float %a %res = fcmp ogt float %lhs, %rhs ret i1 %res } Transformation seems to be correct! (syntactically equal) -- 44. PassManager<Function> : Skipping NOP -- 45. PassManager<Function> : Skipping NOP -- 46. InstCombinePass ---------------------------------------- define i1 @test_fcmp_select_const_const(double %x) { #0: %cmp1 = fcmp ord double %x, 0.000000 %sel = select i1 %cmp1, double 0xffffffffffffffff, double 0.000000 %cmp2 = fcmp oeq double %sel, 0.000000 ret i1 %cmp2 } Transformation seems to be correct! (syntactically equal) -- 47. InstCombinePass ---------------------------------------- define i1 @test_fcmp_select_const_const(double %x) { #0: %cmp1 = fcmp ord double %x, 0.000000 %sel = select i1 %cmp1, double 0xffffffffffffffff, double 0.000000 %cmp2 = fcmp oeq double %sel, 0.000000 ret i1 %cmp2 } => define i1 @test_fcmp_select_const_const(double %x) { #0: %cmp1 = fcmp uno double %x, 0.000000 ret i1 %cmp1 } Transformation seems to be correct! -- 48. PassManager<Function> : Skipping NOP -- 49. PassManager<Function> : Skipping NOP -- 50. InstCombinePass ---------------------------------------- define i1 @test_fcmp_select_var_const(double %x, double %y) { #0: %cmp1 = fcmp ogt double %x, 0.000000 %sel = select i1 %cmp1, double %y, double 0.000000 %cmp2 = fcmp olt double %sel, 0.000000 ret i1 %cmp2 } Transformation seems to be correct! (syntactically equal) -- 51. InstCombinePass ---------------------------------------- define i1 @test_fcmp_select_var_const(double %x, double %y) { #0: %cmp1 = fcmp ogt double %x, 0.000000 %sel = select i1 %cmp1, double %y, double 0.000000 %cmp2 = fcmp olt double %sel, 0.000000 ret i1 %cmp2 } => define i1 @test_fcmp_select_var_const(double %x, double %y) { #0: %cmp1 = fcmp ule double %x, 0.000000 %#1 = fcmp olt double %y, 0.000000 %cmp2 = select i1 %cmp1, i1 1, i1 %#1 ret i1 %cmp2 } Transformation seems to be correct! -- 52. PassManager<Function> : Skipping NOP -- 53. PassManager<Function> : Skipping NOP -- 54. InstCombinePass ---------------------------------------- define i1 @test_fcmp_select_var_const_fmf(double %x, double %y) { #0: %cmp1 = fcmp ogt double %x, 0.000000 %sel = select i1 %cmp1, double %y, double 0.000000 %cmp2 = fcmp nnan olt double %sel, 0.000000 ret i1 %cmp2 } Transformation seems to be correct! (syntactically equal) -- 55. InstCombinePass ---------------------------------------- define i1 @test_fcmp_select_var_const_fmf(double %x, double %y) { #0: %cmp1 = fcmp ogt double %x, 0.000000 %sel = select i1 %cmp1, double %y, double 0.000000 %cmp2 = fcmp nnan olt double %sel, 0.000000 ret i1 %cmp2 } => define i1 @test_fcmp_select_var_const_fmf(double %x, double %y) { #0: %cmp1 = fcmp ule double %x, 0.000000 %#1 = fcmp nnan olt double %y, 0.000000 %cmp2 = select i1 %cmp1, i1 1, i1 %#1 ret i1 %cmp2 } Transformation seems to be correct! -- 56. PassManager<Function> : Skipping NOP -- 57. PassManager<Function> : Skipping NOP -- 58. InstCombinePass ---------------------------------------- define <2 x i1> @test_fcmp_select_const_const_vec(<2 x double> %x) { #0: %cmp1 = fcmp ord <2 x double> %x, { 0.000000, 0.000000 } %sel = select <2 x i1> %cmp1, <2 x double> { 0xffffffffffffffff, 0xffffffffffffffff }, <2 x double> { 0.000000, 0.000000 } %cmp2 = fcmp oeq <2 x double> %sel, { 0.000000, 0.000000 } ret <2 x i1> %cmp2 } Transformation seems to be correct! (syntactically equal) -- 59. InstCombinePass ---------------------------------------- define <2 x i1> @test_fcmp_select_const_const_vec(<2 x double> %x) { #0: %cmp1 = fcmp ord <2 x double> %x, { 0.000000, 0.000000 } %sel = select <2 x i1> %cmp1, <2 x double> { 0xffffffffffffffff, 0xffffffffffffffff }, <2 x double> { 0.000000, 0.000000 } %cmp2 = fcmp oeq <2 x double> %sel, { 0.000000, 0.000000 } ret <2 x i1> %cmp2 } => define <2 x i1> @test_fcmp_select_const_const_vec(<2 x double> %x) { #0: %cmp1 = fcmp uno <2 x double> %x, { 0.000000, 0.000000 } ret <2 x i1> %cmp1 } Transformation seems to be correct! -- 60. PassManager<Function> : Skipping NOP -- 61. PassManager<Function> : Skipping NOP -- 62. InstCombinePass ---------------------------------------- define double @test_fcmp_select_clamp(double %x) { #0: %cmp1 = fcmp ogt double %x, 0.900000 %sel1 = select i1 %cmp1, double 0.900000, double %x %cmp2 = fcmp olt double %sel1, 0.500000 %sel2 = select i1 %cmp2, double 0.500000, double %sel1 ret double %sel2 } Transformation seems to be correct! (syntactically equal) -- 63. InstCombinePass ---------------------------------------- define double @test_fcmp_select_clamp(double %x) { #0: %cmp1 = fcmp ogt double %x, 0.900000 %sel1 = select i1 %cmp1, double 0.900000, double %x %cmp2 = fcmp olt double %sel1, 0.500000 %sel2 = select i1 %cmp2, double 0.500000, double %sel1 ret double %sel2 } Transformation seems to be correct! (syntactically equal) -- 64. PassManager<Function> : Skipping NOP -- 65. PassManager<Function> : Skipping NOP -- 66. InstCombinePass ---------------------------------------- define double @test_fcmp_select_maxnum(double %x) { #0: %cmp1 = fcmp ogt double %x, 1.000000 %sel1 = select nnan nsz i1 %cmp1, double %x, double 1.000000 %cmp2 = fcmp olt double %sel1, 255.000000 %sel2 = select nnan nsz i1 %cmp2, double %sel1, double 255.000000 ret double %sel2 } Transformation seems to be correct! (syntactically equal) -- 67. InstCombinePass ---------------------------------------- define double @test_fcmp_select_maxnum(double %x) { #0: %cmp1 = fcmp ogt double %x, 1.000000 %sel1 = select nnan nsz i1 %cmp1, double %x, double 1.000000 %cmp2 = fcmp olt double %sel1, 255.000000 %sel2 = select nnan nsz i1 %cmp2, double %sel1, double 255.000000 ret double %sel2 } => define double @test_fcmp_select_maxnum(double %x) { #0: %sel1 = fmax nnan nsz double %x, 1.000000 %sel2 = fmin nnan nsz double %sel1, 255.000000 ret double %sel2 } Transformation doesn't verify! (unsound) ERROR: Target is more poisonous than source Example: double %x = #x7ff0000000800000 (SNaN) Source: i1 %cmp1 = #x0 (0) double %sel1 = #x3ff0000000000000 (1) i1 %cmp2 = #x1 (1) double %sel2 = #x3ff0000000000000 (1) Target: double %sel1 = poison double %sel2 = poison Source value: #x3ff0000000000000 (1) 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_jnmrvH4c_HlXt.bc" ------------------- SMT STATS ------------------- Num queries: 66 Num invalid: 0 Num skips: 0 Num trivial: 36 (35.3%) Num timeout: 0 (0.0%) Num errors: 0 (0.0%) Num SAT: 30 (45.5%) Num UNSAT: 36 (54.5%) Alive2: Transform doesn't verify; aborting!
RUN: at line 2: /home/nlopes/alive2/build/opt-alive.sh < /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/fcmp-select.ll -passes=instcombine -S | /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/fcmp-select.ll + /home/nlopes/alive2/build/opt-alive.sh -passes=instcombine -S + /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/fcmp-select.ll FileCheck error: '<stdin>' is empty. FileCheck command line: /bitbucket/nlopes/llvm/build/bin/FileCheck /bitbucket/nlopes/llvm/llvm/test/Transforms/InstCombine/fcmp-select.ll