[PATCHES] AMDGPU/SI: Small ISel improvements

Michel Dänzer via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 20:07:41 PDT 2015


On 15.10.2015 03:15, Marek Olšák via llvm-commits wrote:
> @@ -2617,10 +2617,9 @@ def : Pat <
>  
>  // Prevent expanding both fneg and fabs.
>  
> -// FIXME: Should use S_OR_B32
>  def : Pat <
>    (fneg (fabs f32:$src)),
> -  (V_OR_B32_e32 $src, (V_MOV_B32_e32 0x80000000)) /* Set sign bit */
> +  (S_OR_B32 $src, 0x80000000) /* Set sign bit */
>  >;

BTW, shouldn't this really use XOR to toggle the sign bit? (Speaking as
the one who added the V_OR_B32 implementation :)


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the llvm-commits mailing list