Hi, >> For signed types with TYPE_OVERFLOW_UNDEFINED >> you can simply cancel the operation (even for non-power-of-two multipliers). Thanks for the review and comments. Please find attached the modified patch as per your comments. Please review the same and let me know if any further modifications are required. Regression Tested on X86_64. Thanks, Naveen gcc/testsuite/ChangeLog: 2015-07-21 Naveen H.S PR middle-end/25529 * gcc.dg/pr25529.c: New test. gcc/ChangeLog: 2015-07-21 Naveen H.S PR middle-end/25529 * match.pd (exact_div (mult @0 INTEGER_CST@1) @1) : New simplifier. (trunc_div (mult @0 integer_pow2p@1) @1) : New simplifier.