1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
llvm-mirror/lib/CodeGen/SelectionDAG
Bill Wendling 08690f06b2 - Fix comment so that it describes how the code really works:
// fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) ->
   //   (rotl x, y)
   // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) ->
   //   (rotr x, (sub 32, y))

Example: (x == 0xDEADBEEF and y == 4)

    (x << 4) | (x >> 28)
 => 0xEADBEEF0 | 0x0000000D
 => 0xEADBEEFD

    (rotl x, 4)
 => 0xEADBEEFD

    (rotr x, 28)
 => 0xEADBEEFD

- Fix comment and code for second version. It wasn't using the rot* propertly.

   // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) -> 
   //   (rotr x, y)
   // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) ->
   //   (rotl x, (sub 32, y))

    (x << 28) | (x >> 4)
 => 0xD0000000 | 0x0DEADBEE
 => 0xDDEADBEE

    (rotl x, 4)
 => 0xEADBEEFD

    (rotr x, 28)
 => (0xEADBEEFD)

llvm-svn: 55575
2008-08-31 00:37:27 +00:00
..
CallingConvLower.cpp Trim unnecessary #includes. 2008-07-11 20:38:31 +00:00
DAGCombiner.cpp - Fix comment so that it describes how the code really works: 2008-08-31 00:37:27 +00:00
FastISel.cpp Fix an issue where a use might be selected before a def, and then we didn't respect the pre-chosen vreg 2008-08-30 00:38:46 +00:00
LegalizeDAG.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
LegalizeFloatTypes.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
LegalizeIntegerTypes.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
LegalizeTypes.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
LegalizeTypes.h erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
LegalizeTypesGeneric.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
LegalizeVectorTypes.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
Makefile remove attribution from lib Makefiles. 2007-12-29 20:09:26 +00:00
ScheduleDAG.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
ScheduleDAGList.cpp Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk 2008-07-17 19:10:17 +00:00
ScheduleDAGRRList.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
SelectionDAG.cpp typo 2008-08-30 22:16:05 +00:00
SelectionDAGISel.cpp Add a target callback for FastISel. 2008-08-28 23:21:34 +00:00
SelectionDAGPrinter.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
TargetLowering.cpp erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00