mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
6fa4110be7
When processing inline asm that contains errors, make sure we can recover gracefully by creating an UNDEF SDValue for the inline asm statement before returning from SelectionDAGBuilder::visitInlineAsm. This is necessary for consumers that don't exit on the first error that is emitted (e.g. clang) and that would assert later on. Fixes PR24071. Patch by Diana Picus. llvm-svn: 269811
17 lines
499 B
LLVM
17 lines
499 B
LLVM
; RUN: not llc -mcpu=pwr7 -o /dev/null %s 2>&1 | FileCheck %s
|
|
target datalayout = "E-m:e-i64:64-n32:64"
|
|
target triple = "powerpc64-unknown-linux-gnu"
|
|
|
|
define zeroext i1 @testi1(i1 zeroext %b1, i1 zeroext %b2) #0 {
|
|
entry:
|
|
%0 = tail call i8 asm "crand $0, $1, $2", "=^wc,^wc,^wc"(i1 %b1, i1 %b2) #0
|
|
%1 = and i8 %0, 1
|
|
%tobool3 = icmp ne i8 %1, 0
|
|
ret i1 %tobool3
|
|
|
|
; CHECK: error: couldn't allocate output register for constraint 'wc'
|
|
}
|
|
|
|
attributes #0 = { nounwind "target-features"="-crbits" }
|
|
|