llvm.org GIT mirror llvm / 20e8d72
Merging r370753: ------------------------------------------------------------------------ r370753 | jonpa | 2019-09-03 15:31:22 +0200 (Tue, 03 Sep 2019) | 6 lines [SystemZ] Recognize INLINEASM_BR in backend. SystemZInstrInfo::analyzeBranch() needs to check for INLINEASM_BR instructions, or it will crash. Review: Ulrich Weigand ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_90@371043 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 1 year, 2 months ago
2 changed file(s) with 17 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
461461 break;
462462
463463 // A terminator that isn't a branch can't easily be handled by this
464 // analysis.
465 if (!I->isBranch())
464 // analysis. Asm goto is not understood / optimized.
465 if (!I->isBranch() || I->getOpcode() == SystemZ::INLINEASM_BR)
466466 return true;
467467
468468 // Can't handle indirect branches.
0 ; Test that asm goto can be compiled.
1 ;
2 ; RUN: llc < %s -mtriple=s390x-linux-gnu
3
4 define i32 @c() {
5 entry:
6 callbr void asm sideeffect "", "X"(i8* blockaddress(@c, %d))
7 to label %asm.fallthrough [label %d]
8
9 asm.fallthrough: ; preds = %entry
10 br label %d
11
12 d: ; preds = %asm.fallthrough, %entry
13 ret i32 undef
14 }