Skip to content

Commit

Permalink
[AVR] Remove an assertion that causes generic CodeGen tests to fail
Browse files Browse the repository at this point in the history
It was discussed a few years ago and agreed that it makes sense to
remove this assertion as other targets do not perform similar register
size checking in inline assembly constraint logic, so the check just
adds a needless barrier on AVR.

This patch removes the assertion and removes 'XFAIL' from two Generic
CodeGen tests for AVR as a result.
  • Loading branch information
dylanmckay committed Feb 4, 2021
1 parent 62e4f22 commit 83e2710
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion llvm/lib/Target/AVR/AVRISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,6 @@ AVRTargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
if (VT == MVT::i8)
return std::make_pair(0U, &AVR::GPR8RegClass);

assert(VT == MVT::i16 && "inline asm constraint too large");
return std::make_pair(0U, &AVR::DREGSRegClass);
case 't': // Temporary register: r0.
return std::make_pair(unsigned(AVR::R0), &AVR::GPR8RegClass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
; PR1557

; Bug: PR31336
; XFAIL: avr

define i32 @stuff(i32, ...) {
%foo = alloca i8*
Expand Down
3 changes: 0 additions & 3 deletions llvm/test/CodeGen/Generic/inline-asm-mem-clobber.ll
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
; RUN: llc -O2 -no-integrated-as < %s | FileCheck %s

; Test uses 32-bit registers which aren't supported on AVR.
; XFAIL: avr

@G = common global i32 0, align 4

define i32 @foo(i8* %p) nounwind uwtable {
Expand Down

0 comments on commit 83e2710

Please sign in to comment.