[PATCH] D25878: IR, X86: Understand !range metadata on global variables.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 22:59:11 PST 2016
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1725
+ EVT VT = N.getValueType();
+ bool WasTruncated = false;
+ if (N.getOpcode() == ISD::TRUNCATE) {
----------------
This code WasTruncated stuff could probably use some comments explaining it.
================
Comment at: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1735
unsigned Opc = N.getOperand(0)->getOpcode();
- if (Opc == ISD::TargetConstantPool || Opc == ISD::TargetJumpTable ||
- Opc == ISD::TargetExternalSymbol || Opc == ISD::TargetGlobalAddress ||
- Opc == ISD::TargetGlobalTLSAddress || Opc == ISD::MCSymbol ||
- Opc == ISD::TargetBlockAddress) {
+ if (Opc != ISD::TargetGlobalAddress || !WasTruncated) {
Op = N.getOperand(0);
----------------
Were the 7 different opcode checks we had before significant? It safe to replace them with this single check for TargetGlobalAddress?
https://reviews.llvm.org/D25878
More information about the llvm-commits
mailing list