[PATCH] Fixing inst-combine not to drops nsw when combining adds into mul (PR19263)

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Thu Jun 5 14:39:12 PDT 2014


Yet another thing to be careful about. The proposed patch would have
disable the combining in

define i16 @f(i16 %a) {
       %b = mul i16 %a, 2
       %c = mul i16 %a, 32767
       %d = add i16 %b, %c
       ret i16 %d
}

I added the testcase in r210287.

http://reviews.llvm.org/D3799






More information about the llvm-commits mailing list