[llvm-commits] [dragonegg] r169388 - /dragonegg/trunk/src/Convert.cpp
Duncan Sands
baldrick at free.fr
Wed Dec 5 07:12:11 PST 2012
Author: baldrick
Date: Wed Dec 5 09:12:11 2012
New Revision: 169388
URL: http://llvm.org/viewvc/llvm-project?rev=169388&view=rev
Log:
Another place where implicit type conversions sometimes occur, eg when compiling
slasq2 from lapack with the GCC optimizations enabled. I didn't manage to reduce
a small testcase.
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=169388&r1=169387&r2=169388&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Wed Dec 5 09:12:11 2012
@@ -6048,8 +6048,9 @@
Value *IndexVal = EmitRegister(Index);
tree LowerBound = array_ref_low_bound(exp);
if (!integer_zerop(LowerBound))
- IndexVal = Builder.CreateSub(IndexVal, EmitRegister(LowerBound), "",
- hasNUW(TREE_TYPE(Index)),
+ IndexVal = Builder.CreateSub(IndexVal,
+ EmitRegisterWithCast(LowerBound, IndexType),
+ "", hasNUW(TREE_TYPE(Index)),
hasNSW(TREE_TYPE(Index)));
LValue ArrayAddrLV = EmitLV(Array);
More information about the llvm-commits
mailing list