On 27 February 2018 at 01:12, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: > On Mon, Feb 26, 2018 at 03:36:38PM -0800, Christopher Li wrote: >> >> You said you did not found crash in your first round testing. >> However there is some regression of the IR. Can you share >> the regression test case you found? > > I didn't spend much time at it but a typical small example > of what I've seen is: > void a(void) { > long b; > unsigned c = 0; > for (;;) > if (c) > c = b; > } > Hi, I have checked above in my project - basically this failed before and it fails after the patch. As I mentioned, this issue has been discussed at length before - if a variable is uninitialized then it can cause problems in the simplification phase - especially if branching is involved. In my version _before_ I applied the patch: C:\work\github\dmr_c\tests\set1>..\..\build\Debug\linearize.exe -O1 crash2.c crash2.c:7:1: warning: no newline at end of file crash2.c:1:6: warning: symbol 'a' was not declared. Should it be static? a: .L0: <entry-point> store.32 $8 -> 0[b] phisrc.32 %phi1(b) <- $8 phisrc.32 %phi2 <- $8 phisrc.32 %phi3 <- $8 br .L1 .L1: load.32 %r1 <- 0[b] symaddr.64* %r2 <- b scast.64 %r4 <- (32) VOID muls.64 %r5 <- %r4, $4 add.64* %r6 <- %r2, %r5 store.32 %r1 -> 0[%r6] br .L1 It is the VOID that is the problem. Previously I reported: https://marc.info/?l=linux-sparse&m=149070715427276&w=2 https://marc.info/?l=linux-sparse&m=148983731629748&w=2 These reports led to the whole discussion on the problems with Sparse SSA implementation. I also do not think that one can have regression in Sparse IR as there is no defined correct IR for sparse. The correct IR is what gives the correct results - and that is why I use LLVM backend in all my tests as it tells me what the real outcome is. IR output changes from one change to another and just because something has changed it doesn't make it incorrect - the only measure is whether it caused existing tests to fail or resulted in wrong result from the compiled program. Regards Dibyendu -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html