simplify '(x * -1)' to '-x'
[smatch.git] / validation / optim / muldiv-minus-one.c
blob729b73443d809fe578ae5238526aafc2c1b8fdaf
1 typedef unsigned int u32;
3 int smulm1(int a) { return a * -1; }
4 u32 umulm1(u32 a) { return a * (u32) -1; }
6 /*
7 * check-name: muldiv-minus-one
8 * check-command: test-linearize -Wno-decl $file
9 * check-output-ignore
11 * check-output-excludes: mul[us]\\.
12 * check-output-contains: neg\\.