Add plug point for treating arguments as locals#315
Conversation
|
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/3836932737 Detailsfizzbuzz.bc--- /dev/fd/63 2023-01-04 09:58:05.445872322 +0000
+++ /dev/fd/62 2023-01-04 09:58:05.445872322 +0000
@@ -11,15 +11,14 @@
var1 = 0U;
while ((int)var1 < 30)
{
- if ((int)var1 % 3 != 0U || !((int)var1 % 5 == 0U || (int)var1 % 3 != 0U)) {
- if ((int)var1 % 3 != 0U && ((int)var1 % 3 != 0U || (int)var1 % 5 != 0U)) {
+ if (!((int)var1 % 3 != 0U || (int)var1 % 5 == 0U) || (int)var1 % 3 != 0U) {
+ if ((int)var1 % 3 != 0U) {
if ((int)var1 % 5 != 0U) {
printf("%d\n", var1);
} else {
printf("buzz\n");
}
- }
- if ((int)var1 % 3 == 0U && ((int)var1 % 3 != 0U || (int)var1 % 5 != 0U)) {
+ } else {
printf("fizz\n");
}
} else {typedefs_of_typedefs.bcswitch_loop.bcfunc_cond_zero_arg.bcfcmp.bcconflicting_names.bcstruct.bcissue_183_literal_structs.bczeroinit.bcstruct_swap.bcinit_list.bcret0.bcbool.bcbitops.bccast.bcnullptr.bcconflicting_global.bcarray_swap.bcbitmask.bcbinops.bcfloat.bcreg_test_structure_fields.bcvectors.bcfuncptr.bcgoto_loop.bcshort.bctrunc.bcinttoptr.bcissue_4.bcissue_127_uint128_t_lit.bcissue_123_uint128_t.bcfizzbuzz_stateful.bcissue_94_strncmp.bcnested_struct.bcglobal_using_function_decl.bcbyval_struct.bcnested_while.bcfunc_cond_two_arg.bczext.bcassert.bcloop.bcswitch.bcbranch.bctemplate_parameter_pack.bcbyval_tail_nogep.llbyval_tail_gep.ll |
|
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/3987629702 Detailsfizzbuzz.bctypedefs_of_typedefs.bcswitch_loop.bcfunc_cond_zero_arg.bcfcmp.bcconflicting_names.bcstruct.bcissue_183_literal_structs.bczeroinit.bcglobal_using_function_decl.bcinit_list.bcret0.bcgoto_loop.bcbool.bcbitops.bccast.bcnullptr.bcconflicting_global.bcarray_swap.bcbitmask.bcbinops.bcfloat.bcreg_test_structure_fields.bcvectors.bcfuncptr.bcstruct_swap.bcshort.bctrunc.bcinttoptr.bcissue_4.bcissue_127_uint128_t_lit.bcissue_123_uint128_t.bcfizzbuzz_stateful.bcissue_94_strncmp.bcnested_struct.bczext.bcbyval_struct.bcnested_while.bc--- /dev/fd/63 2023-01-23 15:07:11.963468951 +0000
+++ /dev/fd/62 2023-01-23 15:07:11.963468951 +0000
@@ -25,7 +25,7 @@
printf("loop2 x: %d\n", var1);
}
}
- if (((int)var1 >= 20 || (int)var1 <= 10) && (int)var1 >= 20) {
+ if ((int)var1 >= 20 && ((int)var1 >= 20 || (int)var1 <= 10)) {
return var0;
}
}func_cond_two_arg.bcassert.bcloop.bcswitch.bcbranch.bctemplate_parameter_pack.bcbyval_tail_gep.llbyval_tail_nogep.ll |
4efc2a9 to
a78a14a
Compare
|
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/4007072893 Detailsfizzbuzz.bctypedefs_of_typedefs.bcswitch_loop.bcfunc_cond_zero_arg.bcfcmp.bcconflicting_names.bcstruct.bcissue_183_literal_structs.bczeroinit.bcglobal_using_function_decl.bcinit_list.bcret0.bcgoto_loop.bcbool.bcbitops.bccast.bcnullptr.bcconflicting_global.bcarray_swap.bcbitmask.bcbinops.bcfloat.bcreg_test_structure_fields.bcvectors.bcfuncptr.bcstruct_swap.bcshort.bctrunc.bcinttoptr.bcissue_4.bcissue_127_uint128_t_lit.bcissue_123_uint128_t.bcfizzbuzz_stateful.bcissue_94_strncmp.bcnested_struct.bczext.bcbyval_struct.bcnested_while.bcfunc_cond_two_arg.bcassert.bcloop.bcswitch.bcbranch.bctemplate_parameter_pack.bcbyval_tail_gep.llbyval_tail_nogep.ll |
|
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/4015340181 Detailsfizzbuzz.bctypedefs_of_typedefs.bcswitch_loop.bcfunc_cond_zero_arg.bcfcmp.bcconflicting_names.bcstruct.bcissue_183_literal_structs.bczeroinit.bcglobal_using_function_decl.bcinit_list.bcret0.bcgoto_loop.bcbool.bcbitops.bccast.bcnullptr.bcconflicting_global.bcarray_swap.bcbitmask.bcbinops.bcfloat.bcreg_test_structure_fields.bcvectors.bcfuncptr.bcstruct_swap.bcshort.bctrunc.bcinttoptr.bcissue_4.bcissue_127_uint128_t_lit.bcissue_123_uint128_t.bcfizzbuzz_stateful.bcissue_94_strncmp.bcnested_struct.bczext.bcbyval_struct.bcnested_while.bc--- /dev/fd/63 2023-01-26 13:04:54.503194856 +0000
+++ /dev/fd/62 2023-01-26 13:04:54.503194856 +0000
@@ -25,7 +25,7 @@
printf("loop2 x: %d\n", var1);
}
}
- if (((int)var1 >= 20 || (int)var1 <= 10) && (int)var1 >= 20) {
+ if ((int)var1 >= 20 && ((int)var1 >= 20 || (int)var1 <= 10)) {
return var0;
}
}func_cond_two_arg.bcassert.bcloop.bcswitch.bcbranch.bctemplate_parameter_pack.bcbyval_tail_gep.llbyval_tail_nogep.ll |
|
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/4015452164 Detailsfizzbuzz.bctypedefs_of_typedefs.bcswitch_loop.bcfunc_cond_zero_arg.bcfcmp.bcconflicting_names.bcstruct.bcissue_183_literal_structs.bczeroinit.bcglobal_using_function_decl.bcinit_list.bcret0.bcgoto_loop.bcbool.bcbitops.bccast.bcnullptr.bcconflicting_global.bcarray_swap.bcbitmask.bcbinops.bcfloat.bcreg_test_structure_fields.bcvectors.bcfuncptr.bcstruct_swap.bcshort.bctrunc.bcinttoptr.bcissue_4.bcissue_127_uint128_t_lit.bcissue_123_uint128_t.bcfizzbuzz_stateful.bcissue_94_strncmp.bcnested_struct.bczext.bcbyval_struct.bcnested_while.bcfunc_cond_two_arg.bcassert.bcloop.bcswitch.bcbranch.bctemplate_parameter_pack.bcbyval_tail_gep.llbyval_tail_nogep.ll |
|
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/4105996780 Detailsfizzbuzz.bctypedefs_of_typedefs.bcswitch_loop.bcfunc_cond_zero_arg.bcfcmp.bcconflicting_names.bcstruct.bcissue_183_literal_structs.bczeroinit.bcglobal_using_function_decl.bcinit_list.bcret0.bcgoto_loop.bcbool.bcbitops.bccast.bcnullptr.bcconflicting_global.bcarray_swap.bcbitmask.bcbinops.bcfloat.bcreg_test_structure_fields.bcvectors.bcfuncptr.bcstruct_swap.bcshort.bctrunc.bcinttoptr.bcissue_4.bcissue_127_uint128_t_lit.bcissue_123_uint128_t.bcfizzbuzz_stateful.bcissue_94_strncmp.bcnested_struct.bczext.bcbyval_struct.bcnested_while.bc--- /dev/fd/63 2023-02-06 17:11:06.315041757 +0000
+++ /dev/fd/62 2023-02-06 17:11:06.315041757 +0000
@@ -25,7 +25,7 @@
printf("loop2 x: %d\n", var1);
}
}
- if ((int)var1 >= 20 && ((int)var1 >= 20 || (int)var1 <= 10)) {
+ if (((int)var1 >= 20 || (int)var1 <= 10) && (int)var1 >= 20) {
return var0;
}
}func_cond_two_arg.bcassert.bcloop.bcswitch.bcbranch.bctemplate_parameter_pack.bcbyval_tail_gep.llbyval_tail_nogep.ll |
760985f to
5a342a1
Compare
|
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/4244868052 Detailsfizzbuzz.bctypedefs_of_typedefs.bcswitch_loop.bcfunc_cond_zero_arg.bcconflicting_names.bcstruct.bcissue_183_literal_structs.bcstruct_swap.bcshort.bcinit_list.bcret0.bcgoto_loop.bcbool.bcbitops.bccast.bcnullptr.bcnested_struct.bcarray_swap.bcbitmask.bcbinops.bcfloat.bcreg_test_structure_fields.bczeroinit.bcconflicting_global.bcinttoptr.bcbranch.bcfuncptr.bctrunc.bcvectors.bcissue_4.bcissue_127_uint128_t_lit.bcissue_123_uint128_t.bcfizzbuzz_stateful.bcissue_94_strncmp.bcglobal_using_function_decl.bcfcmp.bcbyval_struct.bcnested_while.bcfunc_cond_two_arg.bczext.bcassert.bcloop.bcswitch.bctemplate_parameter_pack.bcbyval_tail_nogep.llbyval_tail_gep.ll |
5a342a1 to
a86c8b7
Compare
* use zero for undef floats * fix format
|
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/5475823810 Detailsfizzbuzz.bctypedefs_of_typedefs.bcswitch_loop.bcfunc_cond_zero_arg.bcfcmp.bcconflicting_names.bcstruct.bcissue_183_literal_structs.bcinit_list.bcret0.bcgoto_loop.bcbool.bcshort.bccast.bcnullptr.bcconflicting_global.bcarray_swap.bcbitmask.bcbinops.bcfloat.bcreg_test_structure_fields.bcnested_while.bczeroinit.bcfuncptr.bcstruct_swap.bcbranch.bcvectors.bcbitops.bctrunc.bcinttoptr.bcissue_4.bcissue_127_uint128_t_lit.bcissue_123_uint128_t.bcfizzbuzz_stateful.bcissue_94_strncmp.bcnested_struct.bcglobal_using_function_decl.bcbyval_struct.bcfunc_cond_two_arg.bczext.bcassert.bcloop.bcswitch.bctemplate_parameter_pack.bcbyval_tail_nogep.llbyval_tail_gep.ll |
* llvm 17 fixes * Update CI --------- Co-authored-by: Francesco Bertolaccini <francesco.bertolaccini@trailofbits.com>
Also additional method for changing variable type for
allocas