diff options
author | Tim Northover <tnorthover@apple.com> | 2016-08-19 18:32:14 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-08-19 18:32:14 +0000 |
commit | 26b76f2c599c0f5104319a5786093199b173f80d (patch) | |
tree | 05e2d7538c0d5f972261a12d1400cbca39df2eee /llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | |
parent | fbfa3ee4f613af83ef6af70c15b3fccfd5f50444 (diff) | |
download | bcm5719-llvm-26b76f2c599c0f5104319a5786093199b173f80d.tar.gz bcm5719-llvm-26b76f2c599c0f5104319a5786093199b173f80d.zip |
GlobalISel: improve representation of G_SEQUENCE and G_EXTRACT
First, make sure all types involved are represented, rather than being implicit
from the register width.
Second, canonicalize all types to scalar. These operations just act in bits and
don't care about vectors.
Also standardize spelling of Indices in the MachineIRBuilder (NFC here).
llvm-svn: 279294
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index 8703915f919..545b85f1c21 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -197,8 +197,8 @@ bool IRTranslator::translateExtractValue(const User &U) { uint64_t Offset = 8 * DL->getIndexedOffsetInType(Src->getType(), Indices); unsigned Res = getOrCreateVReg(EVI); - MIRBuilder.buildExtract(LLT{*EVI.getType(), DL}, Res, getOrCreateVReg(*Src), - Offset); + MIRBuilder.buildExtract(LLT{*EVI.getType(), DL}, Res, Offset, + LLT{*Src->getType(), DL}, getOrCreateVReg(*Src)); return true; } @@ -255,8 +255,8 @@ bool IRTranslator::translateKnownIntrinsic(const CallInst &CI, MIB.addUse(Zero); } - MIRBuilder.buildSequence(LLT{*CI.getType(), DL}, getOrCreateVReg(CI), Res, 0, - Overflow, Width); + MIRBuilder.buildSequence(LLT{*CI.getType(), DL}, getOrCreateVReg(CI), Ty, Res, + 0, s1, Overflow, Width); return true; } |