Skip to content
  1. Jul 01, 2004
  2. Jun 28, 2004
  3. Jun 25, 2004
  4. Jun 24, 2004
  5. Jun 20, 2004
  6. Jun 19, 2004
  7. Jun 18, 2004
  8. Jun 17, 2004
  9. Jun 10, 2004
    • Chris Lattner's avatar
      Fix a bug in my checkin from last night that caused miscompilations of · ee59d4bf
      Chris Lattner authored
      186.crafty, fhourstones and 132.ijpeg.
      
      Bugpoint makes really nasty miscompilations embarassingly easy to find.  It
      narrowed it down to the instcombiner and this testcase (from fhourstones):
      
      bool %l7153_l4706_htstat_loopentry_2E_4_no_exit_2E_4(int* %i, [32 x int]* %works, int* %tmp.98.out) {
      newFuncRoot:
              %tmp.96 = load int* %i          ; <int> [#uses=1]
              %tmp.97 = getelementptr [32 x int]* %works, long 0, int %tmp.96         ; <int*> [#uses=1]
              %tmp.98 = load int* %tmp.97             ; <int> [#uses=2]
              %tmp.99 = load int* %i          ; <int> [#uses=1]
              %tmp.100 = and int %tmp.99, 7           ; <int> [#uses=1]
              %tmp.101 = seteq int %tmp.100, 7                ; <bool> [#uses=2]
              %tmp.102 = cast bool %tmp.101 to int            ; <int> [#uses=0]
              br bool %tmp.101, label %codeRepl4.exitStub, label %codeRepl3.exitStub
      
      codeRepl4.exitStub:             ; preds = %newFuncRoot
              store int %tmp.98, int* %tmp.98.out
              ret bool true
      
      codeRepl3.exitStub:             ; preds = %newFuncRoot
              store int %tmp.98, int* %tmp.98.out
              ret bool false
      }
      
      ... which only has one combination performed on it:
      
      $ llvm-as < t.ll | opt -instcombine -debug | llvm-dis
      IC: Old =       %tmp.101 = seteq int %tmp.100, 7                ; <bool> [#uses=1]
          New =       setne int %tmp.100, 0           ; <bool>:<badref> [#uses=0]
      IC: MOD =       br bool %tmp.101, label %codeRepl3.exitStub, label %codeRepl4.exitStub
      IC: MOD =       %tmp.97 = getelementptr [32 x int]* %works, uint 0, int %tmp.96         ; <int*> [#uses=1]
      
      It doesn't get much better than this.  :)
      
      llvm-svn: 14109
      ee59d4bf
    • Chris Lattner's avatar
      More minor cleanups · c8e7e298
      Chris Lattner authored
      llvm-svn: 14108
      c8e7e298
    • Chris Lattner's avatar
      Eliminate many occurrances of Instruction:: · df20a4d5
      Chris Lattner authored
      llvm-svn: 14107
      df20a4d5
  10. Jun 09, 2004
  11. May 28, 2004
  12. May 27, 2004
    • Chris Lattner's avatar
      Fix InstCombine/load.ll & PR347. · ed79d8af
      Chris Lattner authored
      This code hadn't been updated after the "structs with more than 256 elements"
      related changes to the GEP instruction.  Also it was not handling the
      ConstantAggregateZero class.
      
      Now it does!
      
      llvm-svn: 13834
      ed79d8af
  13. May 25, 2004
  14. May 23, 2004
  15. May 13, 2004
    • Chris Lattner's avatar
      This was not meant to be committed · 0026512b
      Chris Lattner authored
      llvm-svn: 13565
      0026512b
    • Chris Lattner's avatar
      Fix a nasty bug that caused us to unroll EXTREMELY large loops due to overflow · c12c945c
      Chris Lattner authored
      in the size calculation.
      
      This is not something you want to see:
      Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - UNROLLING!
      
      The problem was that 2*2147483648 == 0.
      
      Now we get:
      Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - TOO LARGE: 4294967296>100
      
      Thanks to some anonymous person playing with the demo page that repeatedly
      caused zion to go into swapping land.  That's one way to ensure you'll get
      a quick bugfix.  :)
      
      Testcase here: Transforms/LoopUnroll/2004-05-13-DontUnrollTooMuch.ll
      
      llvm-svn: 13564
      c12c945c
  16. May 09, 2004
  17. May 08, 2004
    • Chris Lattner's avatar
      Implement folding of GEP's like: · 5f667a6f
      Chris Lattner authored
              %tmp.0 = getelementptr [50 x sbyte]* %ar, uint 0, int 5         ; <sbyte*> [#uses=2]
              %tmp.7 = getelementptr sbyte* %tmp.0, int 8             ; <sbyte*> [#uses=1]
      
      together.  This patch actually allows us to simplify and generalize the code.
      
      llvm-svn: 13415
      5f667a6f
  18. May 07, 2004
  19. May 04, 2004
  20. May 02, 2004
  21. Apr 30, 2004
    • Chris Lattner's avatar
      Fix a major pessimization in the instcombiner. If an allocation instruction · 652064e3
      Chris Lattner authored
      is only used by a cast, and the casted type is the same size as the original
      allocation, it would eliminate the cast by folding it into the allocation.
      
      Unfortunately, it was placing the new allocation instruction right before
      the cast, which could pull (for example) alloca instructions into the body
      of a function.  This turns statically allocatable allocas into expensive
      dynamically allocated allocas, which is bad bad bad.
      
      This fixes the problem by placing the new allocation instruction at the same
      place the old one was, duh. :)
      
      llvm-svn: 13289
      652064e3
  22. Apr 27, 2004
  23. Apr 26, 2004
Loading