Skip to content
  1. Mar 24, 2011
    • Evan Cheng's avatar
      Nasty bug in ARMBaseInstrInfo::produceSameValue(). The MachineConstantPoolEntry · f098bf11
      Evan Cheng authored
      entries being compared may not be ARMConstantPoolValue. Without checking
      whether they are ARMConstantPoolValue first, and if the stars and moons
      are aligned properly, the equality test may return true (when the first few
      words of two Constants' values happen to be identical) and very bad things can
      happen.
      
      rdar://9125354
      
      llvm-svn: 128203
      f098bf11
    • Johnny Chen's avatar
      CPS3p: Let's reject impossible imod values by returning false from the... · a75d158c
      Johnny Chen authored
      CPS3p: Let's reject impossible imod values by returning false from the DisassembleMiscFrm() function.
      
      Fixed rdar://problem/9179416 ARM disassembler crash: "Unknown imod operand" (fuzz testing)
      
      Opcode=98 Name=CPS3p Format=ARM_FORMAT_MISCFRM(26)
       31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0 
      -------------------------------------------------------------------------------------------------
      | 1: 1: 1: 1| 0: 0: 0: 1| 0: 0: 0: 0| 0: 0: 1: 0| 0: 0: 0: 1| 1: 1: 0: 0| 1: 0: 0: 1| 0: 0: 1: 1|
      -------------------------------------------------------------------------------------------------
      
      Before:
      	cpsUnknown imod operand
      UNREACHABLE executed at /Volumes/data/lldb/llvm/lib/Target/ARM/InstPrinter/../ARMBaseInfo.h:123!
      
      After:
      /Volumes/data/Radar/9179416/mc-input-arm.txt:1:1: warning: invalid instruction encoding
      0x93 0x1c 0x2 0xf1
      ^
      
      llvm-svn: 128192
      a75d158c
    • Johnny Chen's avatar
      Load/Store Multiple: · 0f5d52d6
      Johnny Chen authored
      These instructions were changed to not embed the addressing mode within the MC instructions
      We also need to update the corresponding assert stmt.  Also add two test cases.
      
      llvm-svn: 128191
      0f5d52d6
    • Johnny Chen's avatar
      STRT and STRBT was incorrectly tagged as IndexModeNone during the refactorings (r119821). · 1de8cc6f
      Johnny Chen authored
      We now tag them as IndexModePost.
      
      llvm-svn: 128189
      1de8cc6f
    • Johnny Chen's avatar
      The r128103 fix to cope with the removal of addressing modes from the MC instructions · f949d8e1
      Johnny Chen authored
      were incomplete.  The assert stmt needs to be updated and the operand index incrment is wrong.
      Fix the bad logic and add some sanity checking to detect bad instruction encoding;
      and add a test case.
      
      llvm-svn: 128186
      f949d8e1
    • Devang Patel's avatar
      Enable GlobalMerge on darwin. · abc77347
      Devang Patel authored
      llvm-svn: 128183
      abc77347
    • Andrew Trick's avatar
      Revert r128175. · 4ab9a165
      Andrew Trick authored
      I'm backing this out for the second time. It was supposed to be fixed by r128164, but the mingw self-host must be defeating the fix.
      
      llvm-svn: 128181
      4ab9a165
  2. Mar 23, 2011
  3. Mar 22, 2011
  4. Mar 21, 2011
  5. Mar 19, 2011
    • Daniel Dunbar's avatar
      Revert r127953, "SimplifyCFG has stopped duplicating returns into predecessors · 327cd36f
      Daniel Dunbar authored
      to canonicalize IR", it broke a lot of things.
      
      llvm-svn: 127954
      327cd36f
    • Evan Cheng's avatar
      SimplifyCFG has stopped duplicating returns into predecessors to canonicalize IR · 824a7113
      Evan Cheng authored
      to have single return block (at least getting there) for optimizations. This
      is general goodness but it would prevent some tailcall optimizations.
      One specific case is code like this:
      int f1(void);
      int f2(void);
      int f3(void);
      int f4(void);
      int f5(void);
      int f6(void);
      int foo(int x) {
        switch(x) {
        case 1: return f1();
        case 2: return f2();
        case 3: return f3();
        case 4: return f4();
        case 5: return f5();
        case 6: return f6();
        }
      }
      
      =>
      LBB0_2:                                 ## %sw.bb
        callq   _f1
        popq    %rbp
        ret
      LBB0_3:                                 ## %sw.bb1
        callq   _f2
        popq    %rbp
        ret
      LBB0_4:                                 ## %sw.bb3
        callq   _f3
        popq    %rbp
        ret
      
      This patch teaches codegenprep to duplicate returns when the return value
      is a phi and where the phi operands are produced by tail calls followed by
      an unconditional branch:
      
      sw.bb7:                                           ; preds = %entry
        %call8 = tail call i32 @f5() nounwind
        br label %return
      sw.bb9:                                           ; preds = %entry
        %call10 = tail call i32 @f6() nounwind
        br label %return
      return:
        %retval.0 = phi i32 [ %call10, %sw.bb9 ], [ %call8, %sw.bb7 ], ... [ 0, %entry ]
        ret i32 %retval.0
      
      This allows codegen to generate better code like this:
      
      LBB0_2:                                 ## %sw.bb
              jmp     _f1                     ## TAILCALL
      LBB0_3:                                 ## %sw.bb1
              jmp     _f2                     ## TAILCALL
      LBB0_4:                                 ## %sw.bb3
              jmp     _f3                     ## TAILCALL
      
      rdar://9147433
      
      llvm-svn: 127953
      824a7113
    • Nadav Rotem's avatar
      Add support for legalizing UINT_TO_FP of vectors on platforms which do · e7a101cc
      Nadav Rotem authored
      not have native support for this operation (such as X86).
      The legalized code uses two vector INT_TO_FP operations and is faster
      than scalarizing.
      
      llvm-svn: 127951
      e7a101cc
    • Johnny Chen's avatar
      Fixed an assert by the ARM disassembler for LDRD_PRE/POST. · 0c5f670f
      Johnny Chen authored
      The relevant instruction table entries were changed sometime ago to no longer take
      <Rt2> as an operand.  Modify ARMDisassemblerCore.cpp to accomodate the change and
      add a test case.
      
      llvm-svn: 127935
      0c5f670f
  6. Mar 18, 2011
Loading