[llvm-commits] [llvm] r55982 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Evan Cheng
evan.cheng at apple.com
Mon Sep 8 23:54:52 PDT 2008
Actually my patch isn't quite the same. :-) Why is the check only
needed for ConstantInt? Isn't it needed for all cases. Also, why do
you return "false" when the function is supposed to return an unsigned?
I think the check should be here:
MVT::SimpleValueType VT = TLI.getValueType(V-
>getType()).getSimpleVT();
if (!TLI.isTypeLegal(VT))
return 0;
What do you think?
Evan
On Sep 8, 2008, at 11:32 PM, Owen Anderson wrote:
> Author: resistor
> Date: Tue Sep 9 01:32:02 2008
> New Revision: 55982
>
> URL: http://llvm.org/viewvc/llvm-project?rev=55982&view=rev
> Log:
> Check for type legality before materializing integer constants in
> fast isel. With this change,
> all of MultiSource/Applications passes on Darwin/X86 under FastISel.
>
> Modified:
> llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=55982&r1=55981&r2=55982&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Sep 9
> 01:32:02 2008
> @@ -39,6 +39,8 @@
> MBB->getParent()-
> >getConstantPool());
> // Don't cache constant materializations. To do so would require
> // tracking what uses they dominate.
> + if (!TLI.isTypeLegal(VT))
> + return false;
> Reg = FastEmit_i(VT, VT, ISD::Constant, CI->getZExtValue());
> } else if (isa<GlobalValue>(V)) {
> return TargetMaterializeConstant(dyn_cast<Constant>(V),
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list