diff options
author | Michael Liao <michael.hliao@gmail.com> | 2020-01-14 16:30:52 -0500 |
---|---|---|
committer | Michael Liao <michael.hliao@gmail.com> | 2020-01-14 17:03:05 -0500 |
commit | 8d07f8d98c48ee0a9dca450aaf4e1cabc621ff68 (patch) | |
tree | 1295382489dd8b45da58cd19fae292d36dd07544 /llvm/lib/CodeGen | |
parent | a48600c0a653d34f4af760f117755ed1776adf9d (diff) | |
download | bcm5719-llvm-8d07f8d98c48ee0a9dca450aaf4e1cabc621ff68.tar.gz bcm5719-llvm-8d07f8d98c48ee0a9dca450aaf4e1cabc621ff68.zip |
[DAGCombine] Replace `getIntPtrConstant()` with `getVectorIdxTy()`.
- Prefer `getVectorIdxTy()` as the index operand type for
`EXTRACT_SUBVECTOR` as targets expect different types by overloading
`getVectorIdxTy()`.
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 6030c957420..e5bc08b9280 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -18606,7 +18606,8 @@ SDValue DAGCombiner::visitEXTRACT_SUBVECTOR(SDNode *N) { "Trying to extract from >1 concat operand?"); assert(NewExtIdx % ExtNumElts == 0 && "Extract index is not a multiple of the input vector length."); - SDValue NewIndexC = DAG.getIntPtrConstant(NewExtIdx, DL); + MVT IdxTy = TLI.getVectorIdxTy(DAG.getDataLayout()); + SDValue NewIndexC = DAG.getConstant(NewExtIdx, DL, IdxTy); return DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, NVT, V.getOperand(ConcatOpIdx), NewIndexC); } |