[llvm-bugs] [Bug 34675] New: Crash in TwoAddressInstructions

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 19 14:23:14 PDT 2017


            Bug ID: 34675
           Summary: Crash in TwoAddressInstructions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: davide at freebsd.org
                CC: dmitry.mikulin at sony.com, llvm-bugs at lists.llvm.org,
                    simon.f.whittaker at gmail.com

$ cat rel.ll

target triple = "aarch64--linux-gnu"
%class.b = type { [0 x %"struct.b::B"] }
%"struct.b::B" = type { i32 }
define void @_ZN1b1jEv(%class.b* %this) local_unnamed_addr #0 align 2 {
  %a.sroa.0.0..sroa_idx = getelementptr inbounds %class.b, %class.b* %this, i64
0, i32 0, i64 0, i32 0
  %a.sroa.0.0.copyload = load i32, i32* %a.sroa.0.0..sroa_idx, align 4
  %call = tail call i32 @_ZN1b1eEv(%class.b* %this)
  %conv = sext i32 %a.sroa.0.0.copyload to i64
  %patatino = inttoptr i64 %conv to i8*
  tail call void @llvm.memset.p0i8.i64(i8* %patatino, i8 0, i64 16, i32 4, i1
  %meh = inttoptr i64 %conv to i64*
  %bf.load = load i64, i64* %meh, align 4
  %bf.clear = and i64 %bf.load, -17592186044416
  %bf.set = or i64 %bf.clear, 86
  store i64 %bf.set, i64* %meh, align 4
  ret void
declare i32 @_ZN1b1eEv(%class.b*) local_unnamed_addr #1
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i32, i1)

$ ./llc rel.ll
llc: ../lib/CodeGen/TwoAddressInstructionPass.cpp:1244: bool
llvm::MachineBasicBlock::iterator&, unsigned int, unsigned int, unsigned int,
bool): Assertion `TargetRegisterInfo::isVirtualRegister(regB) && "cannot make
instruction into two-address form"' failed.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170919/1f4424f6/attachment.html>

More information about the llvm-bugs mailing list