similar to: Bug in TailDuplicator?

Displaying 20 results from an estimated 3000 matches similar to: "Bug in TailDuplicator?"

2017 Jul 28
2
Tail merging "undef" with a defined register: wrong code
I've looked into that and it's not going to be simple, unfortunately. Here's the original example again: --- name: fred tracksRegLiveness: true body: | bb.0: successors: %bb.1, %bb.2 J2_jumpt undef %p0, %bb.2, implicit-def %pc J2_jump %bb.1, implicit-def %pc bb.1: successors: %bb.3 %r0 = L2_loadruh_io undef %r0, 0 PS_storerhabs 0, killed
2020 Jul 09
3
question on analyzeBranch and getFallThrough
I am working on a back end for an architecture whose jump via table instruction includes the range check. If the index is out of range, the jump table instruction just falls through. I implemented a pass to remove the range check generated before the jump table instruction because it is superfluous. This causes as assertion in MachineBlockPlacement.cpp:
2017 Jul 27
2
Tail merging "undef" with a defined register: wrong code
The comment in test/CodeGen/X86/branchfolding-undef.mir states that such merging is legal, however doing so can actually generate wrong code: Consider this (valid code): --- name: fred tracksRegLiveness: true body: | bb.0: successors: %bb.1, %bb.2 J2_jumpt undef %p0, %bb.2, implicit-def %pc J2_jump %bb.1, implicit-def %pc bb.1: successors: %bb.3 %r0 =
2017 Jul 28
2
Tail merging "undef" with a defined register: wrong code
On 7/28/2017 1:59 PM, Quentin Colombet wrote: > Hi Krzysztof, > > Thanks for digging into this. > >> On Jul 28, 2017, at 11:08 AM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote: >> >> I've looked into that and it's not going to be simple, unfortunately. >> >> Here's the original example again: >> >> --- >>
2017 Jul 27
2
Tail merging "undef" with a defined register: wrong code
Yes, immediately after branch folding the code would still behave the same as the original. At the same time, any subsequent optimization may "exploit" the incorrect liveness information to do something bad. If you add -run-pass if-converter, you'll get: # After If Converter # Machine code for function fred: IsSSA, NoPHIs, TracksLiveness, NoVRegs BB#0: %R0<def>
2016 Mar 04
2
PHI node to different register class vs TailDuplication
Hi, We're having an issue with TailDuplication in our out-of-tree target and it's this PHI-node that seems to be the cause of the trouble: %vreg2<def> = PHI %vreg0, <BB#2>, %vreg1, <BB#3>; rN:%vreg2 aNlh_0_7:%vreg0 aNlh_rN:%vreg1 Note that the defined %vreg2 has register class "rN" while the read %vreg0 has register class "aNlh_0_7".
2013 Sep 21
0
[LLVMdev] Inserting a custom switch instruction implementation in backend
Hello Probably the easiest way for you is to lower switch instructions via IR-to-IR pass in the way you want. On Sat, Sep 21, 2013 at 3:43 PM, Marcello Maggioni <marcello at codeplay.com> wrote: > Hi, > > in implementing a backend for a target we work on, I ended up needing to > lower the switch instruction in a very specific way that is quite different > from the standard
2013 Sep 21
1
[LLVMdev] Inserting a custom switch instruction implementation in backend
----- Original Message ----- > Hello > > Probably the easiest way for you is to lower switch instructions via > IR-to-IR pass in the way you want. In case it helps, lib/Transforms/Utils/LowerSwitch.cpp does generic switch lowering. You might be able to use that as a base for what you need to do. -Hal > > On Sat, Sep 21, 2013 at 3:43 PM, Marcello Maggioni > <marcello
2006 May 17
0
[LLVMdev] Obfuscation with LLVM
Hi all, I was trying to implement an obfuscation tool for C-code on the basis of LLVM. I got a prototype of the simple obfuscation transformation which converting control flow graph to something like a state machine. I am not sure I will have time to work on extending further this tool with new transformations like opaque predicates and decided to put here source code I have by now with hope
2013 Nov 21
1
[LLVMdev] [PATCH] Making Type::getScalarSizeInBits() const
Hi, while using this function I noticed that Type::getScalarSizeInBits() is not marked as const even if inside its body it just uses only other "const" functions and types. This prevents the usage of the function through const pointers/references to Type without any apparent reason. I propose of marking the function as const. (attached is a patch that does so). Cheers, Marcello --
2012 Jun 29
0
[LLVMdev] Comment "FIXME" in X86MachObjectWriter::RecordX86Relocation
Hi Verena, Windows + MachO is likely to run into lots of problems once you start passing in non-trivial code. The relocation model is very tied to Darwin. I believe some folks doing JIT on Windows have had some success w/ ELF. Hopefully someone more familiar with the specifics of that will chime in. -Jim On Jun 29, 2012, at 8:58 AM, Verena Beckham <verena at codeplay.com> wrote: >
2019 Jul 18
2
Question about TableGen RegisterClass definition
Hi All, I have a question about TableGen RegisterClass definition. I need to map different size of MVTs into a register class as below. def TestReg : RegisterClass<"Test", [v8i32, v4i32], ...> When I look at TableGen and CodeGen, it looks the types are used as following: 1. MCRegisterClass's RegSize and Alignment 2. SpillSize in TableGen 3. Type constraint for instruction
2017 Sep 18
1
Resend: assertion in MachineCopyPropagation::isNopCopy
Hi, anyone know anything about copy propagation? Matthias, I see this was your code originally? Was there some assumptions you made? I'm hitting an assertion in MachineCopyPropagation::isNopCopy: if (Src == PreviousSrc) { assert(Def == PreviousDef); return true; } This code compares two COPY instruction to see whether they are effectively "the same". The assert assumes
2012 Feb 29
1
[LLVMdev] Restrictions on bitcast of arbitrary vector types?
Hi, The LLVM lang ref (http://llvm.org/docs/LangRef.html#i_bitcast) notes that bitcast of vectors to vectors is OK, provided the vectors are of the same size. In attempting this on large vector types (e.g. 16xi64 -> 16xf64), I get assertions related to Extended Value Types when attempting to perform code generation, but no errors at the BC level. Is it simply unsupported to stray outwith
2013 Apr 09
0
[LLVMdev] Getting the position of a BasicBlock that doesn't exist anymore in the backend
Hello, In our LLVM backend we needto output certain labels in the AsmPrinter in order to access certain data through those labels. These labels are related to BlockAddress objects (that come from above) and they should be put into a position that is related to the BasicBlock pointed by that BlockAddress. The problem I'm hitting is that if the BasicBlock that the BlockAddress points to
2013 Jul 22
0
[LLVMdev] Predication bug in AggressiveAntiDepBreaker?
Hi, I wondered whether the AggressiveAntiDepBreaker can properly handle predicated instructions. At the end of PrescanInstruction the "DefIndices" array is updated with the destination register without checking whether the instruction is predicated. That shortens the live range: Later on, in HandleLastUse we check whether the register IsLive, which considers only
2013 Oct 21
0
[LLVMdev] Instruction Emitter crash when emitting glued InlineAsm SDNode
Hi, I'm getting an Instruction emitter crash when emitting an INLINEASM SDNode that is Glued to other nodes. The crash happens at line 808 of file llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp: const MCInstrDesc &MCID = TII->get(F->getMachineOpcode()); with the assertion: assert(isMachineOpcode() && "Not a MachineInstr opcode!"); I'm not a great expert
2012 Jun 29
2
[LLVMdev] Comment "FIXME" in X86MachObjectWriter::RecordX86Relocation
Hi, In X86MachObjectWriter::RecordX86Relocation I found the comment if (Target.isAbsolute()) { // constant // SymbolNum of 0 indicates the absolute section. // // FIXME: Currently, these are never generated (see code below). I cannot // find a case where they are actually emitted. Type = macho::RIT_Vanilla; } Is the FIXME still true? I've got some code that
2012 Oct 19
0
[LLVMdev] Predication on SIMD architectures and LLVM
We are currently doing something similar to your third option in Hexagon backend. But it is a VLIW so predication is not the only reason for that. Sergei --- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation > -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Marcello
2012 Jul 02
0
[LLVMdev] Comment "FIXME" in X86MachObjectWriter::RecordX86Relocation
Hi Jim, Andrew, Thanks, I read the discussions about using ELF + MCJIT + Windows and was hoping MachO would work just as well. Since you don't need to modify LLVM to be able to output MachO this was my first choice. But are you saying MachO will not work as well as ELF? Thanks for the patch Andrew, that will have to be my plan B in this case. Verena On 29/06/2012 23:47, Kaylor, Andrew