<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55899>55899</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Arm test suite failures since enable-split-backedge-in-load-pre option enabled for GVN
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:ARM
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          DavidSpickett
      </td>
    </tr>
</table>

<pre>
    Since https://reviews.llvm.org/D126382 landed our test suite bot has been failing to compile 2 tests.

https://lab.llvm.org/buildbot/#/builders/113/builds/5123

I reduced one of the reproducers down to this C:
```
void a(short *b) {
          long c[9];
          int d;
          short *e = b;
          short f = *e;
#define g(d) c[d] += f * e[d];
  d = 9;
          for (;
        d--;
        c[d] = 0)     ;
          g(3) f = *++e;
          g(3) e = 8;
          g(3) a(c);
        }
```
Compiled with:
```
"/home/david.spickett/build-llvm-aarch64/bin/clang-15" "-cc1" "-triple" "thumbv7-unknown-linux-gnueabihf" "-emit-obj" "--mrelax-relocations" "-disable-free" "-clear-ast-before-backend" "-main-file-name" "lpc.c" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=none" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-target-cpu" "cortex-a15" "-target-feature" "-crc" "-target-feature" "-dotprod" "-target-feature" "+dsp" "-target-feature" "-mve" "-target-feature" "-mve.fp" "-target-feature" "-ras" "-target-feature" "-bf16" "-target-feature" "-sb" "-target-feature" "-i8mm" "-target-feature" "-lob" "-target-feature" "-cdecp0" "-target-feature" "-cdecp1" "-target-feature" "-cdecp2" "-target-feature" "-cdecp3" "-target-feature" "-cdecp4" "-target-feature" "-cdecp5" "-target-feature" "-cdecp6" "-target-feature" "-cdecp7" "-target-feature" "-pacbti" "-target-feature" "+hwdiv-arm" "-target-feature" "+hwdiv" "-target-feature" "+vfp2" "-target-feature" "+vfp2sp" "-target-feature" "+vfp3" "-target-feature" "+vfp3d16" "-target-feature" "+vfp3d16sp" "-target-feature" "+vfp3sp" "-target-feature" "+fp16" "-target-feature" "+vfp4" "-target-feature" "+vfp4d16" "-target-feature" "+vfp4d16sp" "-target-feature" "+vfp4sp" "-target-feature" "-fp-armv8" "-target-feature" "-fp-armv8d16" "-target-feature" "-fp-armv8d16sp" "-target-feature" "-fp-armv8sp" "-target-feature" "-fullfp16" "-target-feature" "+fp64" "-target-feature" "+d32" "-target-feature" "+neon" "-target-feature" "-fp16fml" "-target-feature" "-crypto" "-target-feature" "-sha2" "-target-feature" "-aes" "-target-abi" "aapcs-linux" "-mfloat-abi" "hard" "-fallow-half-arguments-and-returns" "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=gdb" "-fcoverage-compilation-dir=/home/david.spickett/sandbox/build/MultiSource/Benchmarks/MiBench/telecomm-gsm" "-D" "NDEBUG" "-D" "STUPID_COMPILER" "-D" "NeedFunctionPrototypes=1" "-D" "SASR" "-O3" "-Werror=date-time" "-w" "-faddrsig" "-x" "c" "test.c"
```

Though it happened on that bot it reproduces elsewhere with a clang built from `facbfb121a5c0a78b3cc4ecc41b15dcef8d9c6a5` as there's no need to run the code.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNV92S2yoMfhrnhiET2_lxLnKx27SdzpxtO9225_IMBhHTYvAATrZvf4QTO2mzjbOTtbH0IQlJgFRa8WvzrAwHUoXQ-CR_SLJ3-HOwV3DwU6339dS6HZK2abbMi4xoZgQIYltHAvhAfKsCkNIGUjFPSgBDJFNamR0JlnBbN0oDyTqwnyazbTJ7OD5_V6lZeamubJUWKLVj5j0BnMdhmg6E-LlIEXAh9wNxIFoejTRArCShAiQ1zkaq80TYg4nGhUp58iZacJy9nJ1-3efeKkFYkhW-si6QJHsok2xNktXjkU-GP21xsTxZPK6TxTbJr_jKBCJeoQ-CgST5lpR_hciOH4EDB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