I added a testcase for PR31593. A patch (r291535) that fixed this bug didn't have a testcase.
If you run the testcase with the compiler between r291120 that introduced the problem and r291535 that fixed the problem,
you'll get the following error:
FAIL: LLVM :: CodeGen/X86/pr31593.ll (10654 of 19223) ******************** TEST 'LLVM :: CodeGen/X86/pr31593.ll' FAILED ******************** Script: -- ngh/ToT/build/./bin/llc < ngh/ToT/llvm/test/CodeGen/X86/pr31593.ll -mtriple=x86_64-unknown -mattr=sse4.1 -o /dev/null -- Exit Code: 1 Command Output (stderr): -- LLVM ERROR: Cannot select: t14: v2i64 = zero_extend_vector_inreg t18 t18: v4i32 = bitcast t17 t17: v2i64,ch = load<LD16[%0](dereferenceable)> t0, FrameIndex:i64<1>, undef:i64 t1: i64 = FrameIndex<1> t3: i64 = undef In function: _Z3foov
Is this functino needed? It doesn't seem to be called.