diff options
| author | Tim Northover <tnorthover@apple.com> | 2016-12-05 23:10:19 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2016-12-05 23:10:19 +0000 |
| commit | 800638fd67c05ca48317ef2ed28cefc5a685f0f3 (patch) | |
| tree | 065285c8e22fb346f22efa092bc77ca5804d2691 /llvm/test/CodeGen | |
| parent | 48ee418f880819a162291a1aa3fcd472f9d81605 (diff) | |
| download | bcm5719-llvm-800638fd67c05ca48317ef2ed28cefc5a685f0f3.tar.gz bcm5719-llvm-800638fd67c05ca48317ef2ed28cefc5a685f0f3.zip | |
GlobalISel: avoid looking too closely at PHIs when we bail.
The function used to finish off PHIs by adding the relevant basic blocks can
fail if we're aborting and still don't actually have the needed
MachineBasicBlocks. So avoid trying in that case.
llvm-svn: 288727
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll index 25d6c1f191c..e7b1f04e03b 100644 --- a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll +++ b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll @@ -37,3 +37,23 @@ define i128 @ABIi128(i128 %arg1) { define [1 x double] @constant() { ret [1 x double] [double 1.0] } + + ; The key problem here is that we may fail to create an MBB referenced by a + ; PHI. If so, we cannot complete the G_PHI and mustn't try or bad things + ; happen. +; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for pending_phis +define i32 @pending_phis(i1 %tst, i32 %val, i32* %addr) { + br i1 %tst, label %true, label %false + +end: + %res = phi i32 [%val, %true], [42, %false] + ret i32 %res + +true: + store atomic i32 42, i32* %addr seq_cst, align 4 + br label %end + +false: + br label %end + +} |

