Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 1743133002: Subzero: Fix JumpTable lowering on x86-64. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Clean up the test a bit Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index a6bc892ffe1b1f352accf80f243963f09aaade75..b056ea4dbf0f89e0d8c4f652370e811248af217f 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -5853,7 +5853,12 @@ void TargetX86Base<TraitsType>::lowerCaseCluster(const CaseCluster &Case,
const Type PointerType = getPointerType();
if (RangeIndex->getType() != PointerType) {
Index = makeReg(PointerType);
- _movzx(Index, RangeIndex);
+ if (RangeIndex->getType() == IceType_i64) {
John 2016/02/29 15:34:09 How do you feel about: if (typeSizeInByes(Pointer
+ assert(Traits::Is64Bit);
+ _mov(Index, RangeIndex); // trunc
+ } else {
+ _movzx(Index, RangeIndex);
+ }
} else {
Index = legalizeToReg(RangeIndex);
}
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/adv-switch-opt.ll » ('j') | tests_lit/llvm2ice_tests/adv-switch-opt.ll » ('J')

Powered by Google App Engine
This is Rietveld 408576698