Skip to content

Commit 1cbb057

Browse files
author
Aditya Nandakumar
committed
[GISel]: Remove an incorrect assert in CallLowering
https://reviews.llvm.org/D51147 Asserting if any extend of vectors should be up to the target's legalizer/target specific code not in CallLowering. reviewed by : dsanders. llvm-svn: 343325
1 parent 122dbb5 commit 1cbb057

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

llvm/lib/CodeGen/GlobalISel/CallLowering.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ unsigned CallLowering::ValueHandler::extendRegister(unsigned ValReg,
164164
// nop in big-endian situations.
165165
return ValReg;
166166
case CCValAssign::AExt: {
167-
assert(!VA.getLocVT().isVector() && "unexpected vector extend");
168167
auto MIB = MIRBuilder.buildAnyExt(LocTy, ValReg);
169168
return MIB->getOperand(0).getReg();
170169
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2+
; RUN: llc -mtriple=x86_64-linux-gnu -o - -global-isel %s -stop-after=irtranslator | FileCheck %s
3+
4+
define <4 x i1> @foo() {
5+
; CHECK-LABEL: name: foo
6+
; CHECK: bb.1.entry:
7+
; CHECK: [[DEF:%[0-9]+]]:_(<4 x s1>) = G_IMPLICIT_DEF
8+
; CHECK: [[ANYEXT:%[0-9]+]]:_(<4 x s32>) = G_ANYEXT [[DEF]](<4 x s1>)
9+
; CHECK: $xmm0 = COPY [[ANYEXT]](<4 x s32>)
10+
; CHECK: RET 0, implicit $xmm0
11+
entry:
12+
ret <4 x i1> undef ;
13+
}

0 commit comments

Comments
 (0)