llvm.org GIT mirror llvm / feaa463
[X86TTI] Make constant base pointers for getElementPtr opaque. If getElementPtr uses a constant as base pointer, then make the constant opaque. This prevents constant folding it with the offset. The offset can usually be encoded in the load/store instruction itself and the base address doesn't have to be rematerialized several times. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204739 91177308-0d34-0410-b5e6-96231b3b80d8 Juergen Ributzka 6 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
797797 switch (Opcode) {
798798 default: return TCC_Free;
799799 case Instruction::GetElementPtr:
800 if (Idx != 0)
801 return TCC_Free;
800 if (Idx == 0)
801 return 2 * TCC_Basic;
802 return TCC_Free;
802803 case Instruction::Store:
803804 ImmIdx = 0;
804805 break;