Skip to content
  • Evan Cheng's avatar
    Add a peephole optimization to optimize pairs of bitcasts. e.g. · e4b8ac9f
    Evan Cheng authored
    v2 = bitcast v1
    ...
    v3 = bitcast v2
    ...
       = v3
    =>
    v2 = bitcast v1
    ...
       = v1
    if v1 and v3 are of in the same register class.
    
    bitcast between i32 and fp (and others) are often not nops since they
    are in different register classes. These bitcast instructions are often
    left because they are in different basic blocks and cannot be
    eliminated by dag combine.
    
    rdar://9104514
    
    llvm-svn: 127668
    e4b8ac9f
Loading