Skip to content

Commit 3fd7eea

Browse files
committed
SIL: add a failure message operand to Builtin.condfail
The SIL generation for this builtin also changes: instead of generating the cond_fail instructions upfront, let the optimizer generate it, if the operand is a static string literal. In worst case, if the second operand is not a static string literal, the Builtin.condfail is lowered at the end of the optimization pipeline with a default message: "unknown program error".
1 parent e2d313e commit 3fd7eea

18 files changed

+80
-54
lines changed

include/swift/AST/Builtins.def

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,6 @@ BUILTIN_SIL_OPERATION(BeginUnpairedModifyAccess, "beginUnpairedModifyAccess",
314314
/// be a pointer to an UnsafeValueBuffer that records an in progress access.
315315
BUILTIN_SIL_OPERATION(EndUnpairedAccess, "endUnpairedAccess", Special)
316316

317-
/// condfail(Int1) -> ()
318-
/// Triggers a runtime failure if the condition is true.
319-
BUILTIN_SIL_OPERATION(CondFail, "condfail", Special)
320-
321317
/// fixLifetime(T) -> ()
322318
/// Fixes the lifetime of any heap references in a value.
323319
BUILTIN_SIL_OPERATION(FixLifetime, "fixLifetime", Special)
@@ -404,6 +400,10 @@ BUILTIN_RUNTIME_CALL(IsOptionalType, "isOptional", "")
404400
BUILTIN(Id, Name, Attrs)
405401
#endif
406402

403+
/// condfail(Int1, RawPointer) -> ()
404+
/// Triggers a runtime failure if the condition is true.
405+
BUILTIN_MISC_OPERATION(CondFail, "condfail", "", Special)
406+
407407
/// Sizeof has type T.Type -> Int
408408
BUILTIN_MISC_OPERATION(Sizeof, "sizeof", "n", Special)
409409

lib/AST/Builtins.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,9 @@ static ValueDecl *getCanBeObjCClassOperation(ASTContext &Context,
10371037
static ValueDecl *getCondFailOperation(ASTContext &C, Identifier Id) {
10381038
// Int1 -> ()
10391039
auto CondTy = BuiltinIntegerType::get(1, C);
1040+
auto MsgTy = C.TheRawPointerType;
10401041
auto VoidTy = TupleType::getEmpty(C);
1041-
return getBuiltinFunction(Id, {CondTy}, VoidTy);
1042+
return getBuiltinFunction(Id, {CondTy, MsgTy}, VoidTy);
10421043
}
10431044

10441045
static ValueDecl *getAssertConfOperation(ASTContext &C, Identifier Id) {

lib/SIL/OperandOwnership.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ ANY_OWNERSHIP_BUILTIN(AtomicRMW)
953953
ANY_OWNERSHIP_BUILTIN(AtomicStore)
954954
ANY_OWNERSHIP_BUILTIN(BitCast)
955955
ANY_OWNERSHIP_BUILTIN(CanBeObjCClass)
956+
ANY_OWNERSHIP_BUILTIN(CondFail)
956957
ANY_OWNERSHIP_BUILTIN(CmpXChg)
957958
ANY_OWNERSHIP_BUILTIN(CondUnreachable)
958959
ANY_OWNERSHIP_BUILTIN(CopyArray)

lib/SIL/ValueOwnership.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ CONSTANT_OWNERSHIP_BUILTIN(Any, And)
378378
CONSTANT_OWNERSHIP_BUILTIN(Any, AssumeNonNegative)
379379
CONSTANT_OWNERSHIP_BUILTIN(Any, AssumeTrue)
380380
CONSTANT_OWNERSHIP_BUILTIN(Any, BitCast)
381+
CONSTANT_OWNERSHIP_BUILTIN(Any, CondFail)
381382
CONSTANT_OWNERSHIP_BUILTIN(Any, ExactSDiv)
382383
CONSTANT_OWNERSHIP_BUILTIN(Any, ExactUDiv)
383384
CONSTANT_OWNERSHIP_BUILTIN(Any, FAdd)

lib/SILGen/SILGenBuiltin.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -618,18 +618,6 @@ static ManagedValue emitBuiltinEndUnpairedAccess(SILGenFunction &SGF,
618618
return ManagedValue::forUnmanaged(SGF.emitEmptyTuple(loc));
619619
}
620620

621-
/// Specialized emitter for Builtin.condfail.
622-
static ManagedValue emitBuiltinCondFail(SILGenFunction &SGF,
623-
SILLocation loc,
624-
SubstitutionMap substitutions,
625-
ArrayRef<ManagedValue> args,
626-
SGFContext C) {
627-
assert(args.size() == 1 && "condfail should be given one argument");
628-
629-
SGF.B.createCondFail(loc, args[0].getUnmanagedValue(), "runtime failure");
630-
return ManagedValue::forUnmanaged(SGF.emitEmptyTuple(loc));
631-
}
632-
633621
/// Specialized emitter for Builtin.castReference.
634622
static ManagedValue
635623
emitBuiltinCastReference(SILGenFunction &SGF,

lib/SILOptimizer/Analysis/SimplifyInstruction.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,19 @@ SILValue InstSimplifier::visitBeginAccessInst(BeginAccessInst *BAI) {
454454
}
455455

456456
static SILValue simplifyBuiltin(BuiltinInst *BI) {
457+
458+
switch (BI->getBuiltinInfo().ID) {
459+
case BuiltinValueKind::IntToPtr:
460+
if (auto *OpBI = dyn_cast<BuiltinInst>(BI->getOperand(0))) {
461+
if (OpBI->getBuiltinInfo().ID == BuiltinValueKind::PtrToInt) {
462+
return OpBI->getOperand(0);
463+
}
464+
}
465+
return SILValue();
466+
default:
467+
break;
468+
}
469+
457470
const IntrinsicInfo &Intrinsic = BI->getIntrinsicInfo();
458471

459472
switch (Intrinsic.ID) {

lib/SILOptimizer/Mandatory/IRGenPrepare.cpp

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,23 @@ static bool cleanFunction(SILFunction &fn) {
4848
continue;
4949
}
5050

51-
const BuiltinInfo &bInfo = bi->getBuiltinInfo();
52-
if (bInfo.ID != BuiltinValueKind::PoundAssert &&
53-
bInfo.ID != BuiltinValueKind::StaticReport) {
54-
continue;
51+
switch (bi->getBuiltinInfo().ID) {
52+
case BuiltinValueKind::CondFail: {
53+
SILBuilderWithScope Builder(bi);
54+
Builder.createCondFail(bi->getLoc(), bi->getOperand(0),
55+
"unknown program error");
56+
LLVM_FALLTHROUGH;
57+
}
58+
case BuiltinValueKind::PoundAssert:
59+
case BuiltinValueKind::StaticReport:
60+
// The call to the builtin should get removed before we reach
61+
// IRGen.
62+
recursivelyDeleteTriviallyDeadInstructions(bi, /* Force */ true);
63+
madeChange = true;
64+
break;
65+
default:
66+
break;
5567
}
56-
57-
// The call to the builtin should get removed before we reach
58-
// IRGen.
59-
recursivelyDeleteTriviallyDeadInstructions(bi, /* Force */ true);
60-
madeChange = true;
6168
}
6269
}
6370

lib/SILOptimizer/SILCombiner/SILCombinerBuiltinVisitors.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,15 @@ SILInstruction *SILCombiner::visitBuiltinInst(BuiltinInst *I) {
622622
}
623623
break;
624624
}
625+
case BuiltinValueKind::CondFail:
626+
if (auto *SLI = dyn_cast<StringLiteralInst>(I->getOperand(1))) {
627+
if (SLI->getEncoding() == StringLiteralInst::Encoding::UTF8) {
628+
Builder.createCondFail(I->getLoc(), I->getOperand(0), SLI->getValue());
629+
eraseInstFromFunction(*I);
630+
return nullptr;
631+
}
632+
}
633+
break;
625634
default:
626635
break;
627636
}

lib/SILOptimizer/Transforms/AccessEnforcementReleaseSinking.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ static bool isBarrier(SILInstruction *inst) {
129129
case BuiltinValueKind::GetObjCTypeEncoding:
130130
case BuiltinValueKind::Swift3ImplicitObjCEntrypoint:
131131
case BuiltinValueKind::WillThrow:
132+
case BuiltinValueKind::CondFail:
132133
case BuiltinValueKind::PoundAssert:
133134
case BuiltinValueKind::GlobalStringTablePointer:
134135
return false;

stdlib/public/core/Assert.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public func precondition(
9393
}
9494
} else if _isReleaseAssertConfiguration() {
9595
let error = !condition()
96-
Builtin.condfail(error._value)
96+
Builtin.condfail(error._value, StaticString("precondition failure").unsafeRawPointer)
9797
}
9898
}
9999

@@ -171,7 +171,7 @@ public func preconditionFailure(
171171
_assertionFailure("Fatal error", message(), file: file, line: line,
172172
flags: _fatalErrorFlags())
173173
} else if _isReleaseAssertConfiguration() {
174-
Builtin.int_trap()
174+
Builtin.condfail(true._value, StaticString("precondition failure").unsafeRawPointer)
175175
}
176176
_conditionallyUnreachable()
177177
}
@@ -207,12 +207,12 @@ internal func _precondition(
207207
// Only check in debug and release mode. In release mode just trap.
208208
if _isDebugAssertConfiguration() {
209209
if !_fastPath(condition()) {
210-
_fatalErrorMessage("Fatal error", message, file: file, line: line,
210+
_assertionFailure("Fatal error", message, file: file, line: line,
211211
flags: _fatalErrorFlags())
212212
}
213213
} else if _isReleaseAssertConfiguration() {
214214
let error = !condition()
215-
Builtin.condfail(error._value)
215+
Builtin.condfail(error._value, message.unsafeRawPointer)
216216
}
217217
}
218218

@@ -240,7 +240,7 @@ public func _overflowChecked<T>(
240240
file: file, line: line, flags: _fatalErrorFlags())
241241
}
242242
} else {
243-
Builtin.condfail(error._value)
243+
Builtin.condfail(error._value, StaticString("_overflowChecked failure").unsafeRawPointer)
244244
}
245245
return result
246246
}

stdlib/public/core/IntegerTypes.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ ${assignmentOperatorComment(x.operator, True)}
12341234
Builtin.${u}${x.llvmName}_with_overflow_Int${bits}(
12351235
lhs._value, rhs._value, true._value)
12361236
% end
1237-
Builtin.condfail(overflow)
1237+
Builtin.condfail(overflow, StaticString("arithmetic overflow").unsafeRawPointer)
12381238
lhs = ${Self}(result)
12391239
}
12401240
% end

stdlib/public/core/StaticString.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ public struct StaticString
9494
return Int(_utf8CodeUnitCount)
9595
}
9696

97+
@_alwaysEmitIntoClient @_transparent
98+
internal var unsafeRawPointer: Builtin.RawPointer {
99+
return Builtin.inttoptr_Word(_startPtrOrData)
100+
}
101+
97102
/// A Boolean value indicating whether the static string stores a pointer to
98103
/// ASCII or UTF-8 code units.
99104
@_transparent

test/DebugInfo/doubleinlines.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
// RUN: -debug-info-format=codeview -O -parse-as-library \
33
// RUN: -module-name DoubleInlines -o - | %FileCheck %s
44

5-
func condFail(arg: Builtin.Int1 ) {
6-
Builtin.condfail(arg)
5+
func condFail(arg: Builtin.Int1, msg: Builtin.RawPointer) {
6+
Builtin.condfail(arg, msg)
77
}
88

9-
func callCondFail(arg: Builtin.Int1) {
10-
condFail(arg: arg)
9+
func callCondFail(arg: Builtin.Int1, msg: Builtin.RawPointer) {
10+
condFail(arg: arg, msg: msg)
1111
}
1212

13-
// CHECK: define hidden swiftcc void @"$s13DoubleInlines12callCondFail3argyBi1__tF"{{.*}} !dbg ![[FUNCSCOPE:.*]] {
13+
// CHECK: define hidden swiftcc void @"$s13DoubleInlines12callCondFail3arg3msgyBi1__BptF"{{.*}} !dbg ![[FUNCSCOPE:.*]] {
1414
// CHECK: tail call void asm sideeffect "", "n"(i32 0) #3, !dbg ![[SCOPEONE:.*]]
1515
// CHECK: ![[FUNCSCOPEOTHER:.*]] = distinct !DISubprogram(name: "condFail",{{.*}}
1616
// CHECK: ![[SCOPEFIVE:.*]] = distinct !DILexicalBlock(scope: ![[FUNCSCOPE]], file: ![[FILE:.*]], line: 9)

test/DebugInfo/linetable-codeview.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func foo() {
3636
// between other instructions for the division. We want to make sure
3737
// all instructions from the division have the same debug location and
3838
// are contiguous.
39-
// CHECK: call {{.*}} @"$ss18_fatalErrorMessage__4file4line5flagss5NeverOs12StaticStringV_A2HSus6UInt32VtF"{{.*}}, !dbg ![[DIV:[0-9]+]]
39+
// CHECK: call {{.*}} @"$ss17_assertionFailure__4file4line5flagss5NeverOs12StaticStringV_A2HSus6UInt32VtF"{{.*}}, !dbg ![[DIV:[0-9]+]]
4040
// CHECK-NEXT: unreachable, !dbg ![[DIV]]
4141
// CHECK: sdiv i64 %0, %1, !dbg ![[DIV]]
4242
// CHECK: call void @llvm.trap(), !dbg ![[INLINEDADD:[0-9]+]]

test/IRGen/builtins.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
// RUN: %target-swift-frontend -module-name builtins -parse-stdlib -primary-file %s -emit-ir -o - -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
2+
// RUN: %target-swift-frontend -module-name builtins -parse-stdlib -disable-access-control -primary-file %s -emit-ir -o - -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
33

44
// REQUIRES: CPU=x86_64
55

@@ -315,10 +315,10 @@ func testStaticReport(_ b: Bool, ptr: Builtin.RawPointer) -> () {
315315
// CHECK-LABEL: define hidden {{.*}}void @"$s8builtins12testCondFail{{[_0-9a-zA-Z]*}}F"(i1, i1)
316316
func testCondFail(_ b: Bool, c: Bool) {
317317
// CHECK: br i1 %0, label %[[FAIL:.*]], label %[[CONT:.*]]
318-
Builtin.condfail(b)
318+
Builtin.condfail(b, StaticString("message").unsafeRawPointer)
319319
// CHECK: <label>:[[CONT]]
320320
// CHECK: br i1 %1, label %[[FAIL2:.*]], label %[[CONT:.*]]
321-
Builtin.condfail(c)
321+
Builtin.condfail(c, StaticString("message").unsafeRawPointer)
322322
// CHECK: <label>:[[CONT]]
323323
// CHECK: ret void
324324

test/SILGen/builtins.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-swift-emit-silgen -parse-stdlib %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
2-
// RUN: %target-swift-emit-sil -Onone -parse-stdlib %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck -check-prefix=CANONICAL %s
1+
// RUN: %target-swift-emit-silgen -parse-stdlib %s -disable-access-control -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
2+
// RUN: %target-swift-emit-sil -Onone -parse-stdlib %s -disable-access-control -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck -check-prefix=CANONICAL %s
33

44
import Swift
55

@@ -396,8 +396,8 @@ func performInstantaneousReadAccess<T1>(address: Builtin.RawPointer, scratch: Bu
396396

397397
// CHECK-LABEL: sil hidden [ossa] @$s8builtins8condfail{{[_0-9a-zA-Z]*}}F
398398
func condfail(_ i: Builtin.Int1) {
399-
Builtin.condfail(i)
400-
// CHECK: cond_fail {{%.*}} : $Builtin.Int1
399+
Builtin.condfail(i, StaticString("message").unsafeRawPointer)
400+
// CHECK: builtin "condfail"({{%.*}} : $Builtin.Int1, {{%.*}} : $Builtin.RawPointer) : $()
401401
}
402402

403403
struct S {}

test/SILOptimizer/castoptimizer-wrongscope.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// CHECK: alloc_stack $R, loc {{.*}}, scope 2
99
// CHECK-NEXT: init_existential_addr {{.*}} : $*R, $Float, loc {{.*}}, scope 2
10-
// CHECK-NEXT: copy_addr [take] %8 to [initialization] %66 : $*Float, loc {{.*}}, scope 2
10+
// CHECK-NEXT: copy_addr [take] %8 to [initialization] {{.*}} : $*Float, loc {{.*}}, scope 2
1111

1212
protocol R {}
1313
extension Float: R {}

test/SILOptimizer/specialize_checked_cast_branch.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public func ArchetypeToArchetypeCast<T1, T2>(t1 : T1, t2 : T2) -> T2 {
3434
// CHECK: return [[T0]]
3535
//
3636
// CHECK: bb2
37-
// CHECK: builtin "int_trap"
37+
// CHECK: cond_fail {{%.*}}, "precondition failure"
3838
// CHECK: unreachable
3939
// CHECK: } // end sil function '$s30specialize_checked_cast_branch011ArchetypeToE4Cast2t12t2q_x_q_tr0_lFAA1CC_AA1DCTg5'
4040
_ = ArchetypeToArchetypeCast(t1: c, t2: d)
@@ -58,7 +58,7 @@ _ = ArchetypeToArchetypeCast(t1: b, t2: f)
5858
// CHECK-LABEL: sil shared @$s30specialize_checked_cast_branch011ArchetypeToE4Cast2t12t2q_x_q_tr0_lFAA8NotUInt8V_AA1CCTg5 : $@convention(thin) (NotUInt8, @guaranteed C) -> @owned C {
5959
// CHECK: bb0
6060
// CHECK-NOT: bb1
61-
// CHECK: builtin "int_trap"
61+
// CHECK: cond_fail {{%.*}}, "precondition failure"
6262
// CHECK: unreachable
6363
// CHECK: } // end sil function '$s30specialize_checked_cast_branch011ArchetypeToE4Cast2t12t2q_x_q_tr0_lFAA8NotUInt8V_AA1CCTg5'
6464
_ = ArchetypeToArchetypeCast(t1: b, t2: c)
@@ -67,7 +67,7 @@ _ = ArchetypeToArchetypeCast(t1: b, t2: c)
6767
// CHECK-LABEL: sil shared @$s30specialize_checked_cast_branch011ArchetypeToE4Cast2t12t2q_x_q_tr0_lFAA1CC_AA8NotUInt8VTg5 : $@convention(thin) (@guaranteed C, NotUInt8) -> NotUInt8 {
6868
// CHECK: bb0
6969
// CHECK-NOT: bb1
70-
// CHECK: builtin "int_trap"
70+
// CHECK: cond_fail {{%.*}}, "precondition failure"
7171
// CHECK: unreachable
7272
// CHECK: } // end sil function '$s30specialize_checked_cast_branch011ArchetypeToE4Cast2t12t2q_x_q_tr0_lFAA1CC_AA8NotUInt8VTg5'
7373
_ = ArchetypeToArchetypeCast(t1: c, t2: b)
@@ -84,7 +84,7 @@ _ = ArchetypeToArchetypeCast(t1: d, t2: c)
8484
// CHECK-LABEL: sil shared @$s30specialize_checked_cast_branch011ArchetypeToE4Cast2t12t2q_x_q_tr0_lFAA1CC_AA1ECTg5 : $@convention(thin) (@guaranteed C, @guaranteed E) -> @owned E {
8585
// CHECK: bb0
8686
// CHECK-NOT: bb1
87-
// CHECK: builtin "int_trap"
87+
// CHECK: cond_fail {{%.*}}, "precondition failure"
8888
// CHECK: unreachable
8989
// CHECK: } // end sil function '$s30specialize_checked_cast_branch011ArchetypeToE4Cast2t12t2q_x_q_tr0_lFAA1CC_AA1ECTg5'
9090
_ = ArchetypeToArchetypeCast(t1: c, t2: e)
@@ -135,7 +135,7 @@ _ = ArchetypeToConcreteCastUInt8(t: c)
135135
// CHECK-LABEL: sil shared @$s30specialize_checked_cast_branch28ArchetypeToConcreteCastUInt81tAA03NotI0Vx_tlFAA0J6UInt64V_Tg5 : $@convention(thin) (NotUInt64) -> NotUInt8 {
136136
// CHECK: bb0
137137
// CHECK-NOT: checked_cast_br
138-
// CHECK: builtin "int_trap"
138+
// CHECK: cond_fail {{%.*}}, "precondition failure"
139139
// CHECK: unreachable
140140
_ = ArchetypeToConcreteCastUInt8(t: f)
141141

@@ -167,7 +167,7 @@ _ = ArchetypeToConcreteCastC(t: d)
167167
// E -> C
168168
// CHECK-LABEL: sil shared @$s30specialize_checked_cast_branch24ArchetypeToConcreteCastC1tAA1CCx_tlFAA1EC_Tg5 : $@convention(thin) (@guaranteed E) -> @owned C {
169169
// CHECK: bb0
170-
// CHECK: builtin "int_trap"
170+
// CHECK: cond_fail {{%.*}}, "precondition failure"
171171
// CHECK: unreachable
172172
_ = ArchetypeToConcreteCastC(t: e)
173173

@@ -182,15 +182,15 @@ _ = ArchetypeToConcreteCastC(t: e)
182182
// CHECK: return [[T0]] : $D
183183
//
184184
// CHECK: [[FAIL_BB]]:
185-
// CHECK: builtin "int_trap"
185+
// CHECK: cond_fail {{%.*}}, "precondition failure"
186186
// CHECK: unreachable
187187
// CHECK: } // end sil function '$s30specialize_checked_cast_branch24ArchetypeToConcreteCastD1tAA1DCx_tlFAA1CC_Tg5'
188188
_ = ArchetypeToConcreteCastD(t: c)
189189

190190
// C -> E
191191
// CHECK-LABEL: sil shared @$s30specialize_checked_cast_branch24ArchetypeToConcreteCastE1tAA1ECx_tlFAA1CC_Tg5 : $@convention(thin) (@guaranteed C) -> @owned E {
192192
// CHECK: bb0
193-
// CHECK: builtin "int_trap"
193+
// CHECK: cond_fail {{%.*}}, "precondition failure"
194194
// CHECK: unreachable
195195
_ = ArchetypeToConcreteCastE(t: c)
196196

0 commit comments

Comments
 (0)