[llvm] r183343 - R600: Add a pass that merge Vector Register

Vincent Lejeune vljn at ovi.com
Wed Jun 5 23:02:31 PDT 2013


Thank for the fix.

I think it is false alarm, because RemapChan should always contains a value equals to Swizzle.
However I realize now that this loop is rather awkward there and should be encapsulated in a function,
and add an llvm_unreachable if the loop is never exited.

Btw was this compiled with clang 3.3 or 3.4 svn ? I didn't get the warning when building with clang 3.3rc
Vincent



----- Mail original -----
> De : NAKAMURA Takumi <geek4civic at gmail.com>
> À : Sean Silva <silvas at purdue.edu>
> Cc : Vincent Lejeune <vljn at ovi.com>; "llvm-commits at cs.uiuc.edu" <llvm-commits at cs.uiuc.edu>
> Envoyé le : Jeudi 6 juin 2013 4h18
> Objet : Re: [llvm] r183343 - R600: Add a pass that merge Vector Register
> 
> Suppressed in r183371 with arbitrary value.
> 
> Vincent, do you think it would be false alarm?
> 
> 2013/6/6 Sean Silva <silvas at purdue.edu>:
>>  I'm getting the following warning:
>> 
>> 
> /Users/sean/pg/llvm/llvm/lib/Target/R600/R600OptimizeVectorRegisters.cpp:183:49:
>>  warning: variable 'Chan' is used uninitialized whenever 
> 'for' loop exits
>>  because its condition is false [-Wsometimes-uninitialized]
>>      for (unsigned j = 0, je = RemapChan.size(); j < je; j++) {
>>                                                  ^~~~~~
>> 
> /Users/sean/pg/llvm/llvm/lib/Target/R600/R600OptimizeVectorRegisters.cpp:193:17:
>>  note: uninitialized use occurs here
>>          .addImm(Chan);
>>                  ^~~~
>> 
> /Users/sean/pg/llvm/llvm/lib/Target/R600/R600OptimizeVectorRegisters.cpp:183:49:
>>  note: remove the condition if it is always true
>>      for (unsigned j = 0, je = RemapChan.size(); j < je; j++) {
>>                                                  ^~~~~~
>> 
> /Users/sean/pg/llvm/llvm/lib/Target/R600/R600OptimizeVectorRegisters.cpp:182:18:
>>  note: initialize the variable 'Chan' to silence this warning
>>      unsigned Chan;
>>                   ^
>>                    = 0
>>  1 warning generated.
>> 
>>  -- Sean Silva
>> 
>>  _______________________________________________
>>  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