Skip to content

Commit faada2b

Browse files
committed
Add assert and remove unnecessary checks
1 parent fdfa7c9 commit faada2b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ bool PreISelIntrinsicLowering::lowerIntrinsics(Module &M) const {
594594
return false;
595595
const TargetLowering *TL = TM->getSubtargetImpl(F)->getTargetLowering();
596596
unsigned Op = TL->IntrinsicIDToISD(F.getIntrinsicID());
597-
if (Op == ISD::DELETED_NODE ||
598-
!TL->isOperationExpand(Op, EVT::getEVT(Ty)))
597+
assert(Op != ISD::DELETED_NODE && "unsupported intrinsic");
598+
if (!TL->isOperationExpand(Op, EVT::getEVT(Ty)))
599599
return false;
600600
return lowerUnaryVectorIntrinsicAsLoop(M, CI);
601601
});

llvm/test/Transforms/PreISelIntrinsicLowering/AArch64/expand-log.ll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,4 @@ define <4 x float> @fixed_vec_log(<4 x float> %input) {
3737
declare <4 x float> @llvm.log.v4f32(<4 x float>) #0
3838
declare <vscale x 4 x float> @llvm.log.nxv4f32(<vscale x 4 x float>) #0
3939

40-
; CHECK: attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
41-
; CHECK-NEXT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
4240
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

0 commit comments

Comments
 (0)