[llvm-commits] [llvm] r132538 - /llvm/trunk/lib/Support/FoldingSet.cpp

Duncan Sands baldrick at free.fr
Sun Jun 5 10:50:23 PDT 2011


Hi,

> singed int causes signed extension, which contradicts the intention to pick up
> integers with high 32 bits being zero.

do you have a testcase for this?

Ciao, Duncan.

>
> Modified:
>      llvm/trunk/lib/Support/FoldingSet.cpp
>
> Modified: llvm/trunk/lib/Support/FoldingSet.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/FoldingSet.cpp?rev=132538&r1=132537&r2=132538&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/FoldingSet.cpp (original)
> +++ llvm/trunk/lib/Support/FoldingSet.cpp Fri Jun  3 03:29:51 2011
> @@ -92,7 +92,7 @@
>   }
>   void FoldingSetNodeID::AddInteger(unsigned long long I) {
>     AddInteger(unsigned(I));
> -  if ((uint64_t)(int)I != I)
> +  if ((uint64_t)(unsigned)I != I)
>       Bits.push_back(unsigned(I>>  32));
>   }
>
>
>
> _______________________________________________
> 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