summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2017-03-21 21:12:04 +0000
committerTim Northover <tnorthover@apple.com>2017-03-21 21:12:04 +0000
commitdd4b9d6d7b0cf4942cd38f9996ef4ca0454467f6 (patch)
treeecc377877c94f06022eb48673da625fb7f49e300 /llvm/lib/CodeGen
parent947f48fa0e496303448fa23f7f0e647d6b2a3a5a (diff)
downloadbcm5719-llvm-dd4b9d6d7b0cf4942cd38f9996ef4ca0454467f6.tar.gz
bcm5719-llvm-dd4b9d6d7b0cf4942cd38f9996ef4ca0454467f6.zip
GlobalISel: widen booleans by zero-extending to a byte.
A bool is represented by a single byte, which the ARM ABI requires to be either 0 or 1. So we cannot use G_ANYEXT when legalizing the type. llvm-svn: 298439
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index e26473d9a0d..dca5d616779 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -433,7 +433,7 @@ LegalizerHelper::widenScalar(MachineInstr &MI, unsigned TypeIdx, LLT WideTy) {
"illegal to increase number of bytes modified by a store");
unsigned SrcExt = MRI.createGenericVirtualRegister(WideTy);
- MIRBuilder.buildAnyExt(SrcExt, MI.getOperand(0).getReg());
+ MIRBuilder.buildZExt(SrcExt, MI.getOperand(0).getReg());
MIRBuilder.buildStore(SrcExt, MI.getOperand(1).getReg(),
**MI.memoperands_begin());
MI.eraseFromParent();
OpenPOWER on IntegriCloud